|
@@ -11,9 +11,9 @@
|
|
|
<div class="selects">
|
|
|
<div class="selectsBlock">
|
|
|
<div class="selectLabel">项目筛选</div>
|
|
|
- <el-select v-model="pavalues.value" placeholder="我的项目">
|
|
|
+ <el-select v-model="selectInp.filter" placeholder="我的项目">
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
+ v-for="item in options.projectFilter"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
@@ -23,9 +23,9 @@
|
|
|
|
|
|
<div class="selectsBlock">
|
|
|
<div class="selectLabel">部门</div>
|
|
|
- <el-select v-model="pavalues.value1" placeholder="请选择">
|
|
|
+ <el-select v-model="selectInp.department" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in options1"
|
|
|
+ v-for="item in options.department"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
@@ -35,9 +35,9 @@
|
|
|
|
|
|
<div class="selectsBlock">
|
|
|
<div class="selectLabel">分类</div>
|
|
|
- <el-select v-model="pavalues.value2" placeholder="请选择">
|
|
|
+ <el-select v-model="selectInp.sort" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in options2"
|
|
|
+ v-for="item in options.sort"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
@@ -47,9 +47,9 @@
|
|
|
|
|
|
<div class="selectsBlock">
|
|
|
<div class="selectLabel">负责人</div>
|
|
|
- <el-select v-model="pavalues.value3" placeholder="请选择">
|
|
|
+ <el-select v-model="selectInp.person" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in options3"
|
|
|
+ v-for="item in options.person"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
@@ -59,9 +59,9 @@
|
|
|
|
|
|
<div class="selectsBlock">
|
|
|
<div class="selectLabel">状态</div>
|
|
|
- <el-select v-model="pavalues.value4" placeholder="请选择">
|
|
|
+ <el-select v-model="selectInp.state" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in options4"
|
|
|
+ v-for="item in options.state"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
@@ -80,11 +80,13 @@
|
|
|
class="fontSize"
|
|
|
:header-cell-style="{ background: '#f2f2f2',color:'#000' }"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
+ <!-- selection-change批量选择功能后续可能用到 -->
|
|
|
<!--
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
|
width="25"
|
|
|
>
|
|
|
+
|
|
|
</el-table-column> -->
|
|
|
<el-table-column
|
|
|
prop="projectName"
|
|
@@ -146,7 +148,7 @@
|
|
|
<!-- <el-link class="btt" type="primary" :underline="false"> -->
|
|
|
<el-button type="primary" size="mini" @click="paApply">查看详情</el-button>
|
|
|
<el-button type="primary" size="mini" @click="audit">{{(status==-1?"审核": status?"撤回":"审核")}}</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="edit(scope)" >申请表</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="appTable(scope)" >申请表</el-button>
|
|
|
<el-button type="primary" size="mini" @click="del">删除</el-button>
|
|
|
<!-- </el-link> -->
|
|
|
<!-- </el-button> -->
|
|
@@ -269,22 +271,25 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import axios from 'axios';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ iid:'',
|
|
|
textarea:'',
|
|
|
input:'',
|
|
|
status:-1,
|
|
|
dialogVisible:false,//立项审核
|
|
|
dialogVisible1:false,//立项撤回提交
|
|
|
dialogVisible2:false,//删除
|
|
|
- options:[],//项目筛选
|
|
|
- options1:[],//部门
|
|
|
- options2:[],//分类
|
|
|
- options3:[],//负责人
|
|
|
- options4:[],//状态
|
|
|
+
|
|
|
+ options:{
|
|
|
+ projectFilter:[],//项目筛选
|
|
|
+ department:[],//部门
|
|
|
+ sort:[],//分类
|
|
|
+ person:[],//负责人
|
|
|
+ state:[],//状态
|
|
|
+ },
|
|
|
tableData:[{
|
|
|
projectName:'陆地游泳辅助器',
|
|
|
projectPerson:'王多鱼',
|
|
@@ -295,36 +300,24 @@ import axios from 'axios';
|
|
|
state:'已审核',
|
|
|
},
|
|
|
],
|
|
|
- // 头部搜索框的内容
|
|
|
- pavalues:{
|
|
|
- value:'',
|
|
|
- value1:'',
|
|
|
- value2:'',
|
|
|
- value3:'',
|
|
|
- value4:'',
|
|
|
+
|
|
|
+ selectInp:{ // 头部搜索框的内容
|
|
|
+ filter:'',
|
|
|
+ department:'',
|
|
|
+ sort:'',
|
|
|
+ person:'',
|
|
|
+ state:'',
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- getAccountListByPage(){
|
|
|
-
|
|
|
- // axios.post(this.$store.state.api+"/a",{}).then(res=>{
|
|
|
- // console.log(res)
|
|
|
- // })
|
|
|
- this.ajax
|
|
|
- .get()
|
|
|
- .then(res=>{
|
|
|
-
|
|
|
- },err=>{
|
|
|
- console.log(err);
|
|
|
- })
|
|
|
- },
|
|
|
- init(){
|
|
|
+
|
|
|
+ init(){
|
|
|
this.dialogVisible=false;
|
|
|
this.dialogVisible1=false;
|
|
|
this.dialogVisible2=false;
|
|
|
},
|
|
|
- audit(){
|
|
|
+ audit(val){ //审核按钮
|
|
|
if(this.status==-1){
|
|
|
this.dialogVisible=true;
|
|
|
return
|
|
@@ -335,65 +328,87 @@ import axios from 'axios';
|
|
|
this.dialogVisible=true;
|
|
|
}
|
|
|
},
|
|
|
- edit(){
|
|
|
+ appTable(val){ //查看申请表
|
|
|
|
|
|
},
|
|
|
- commit(){
|
|
|
+ commit(val){ //立项审核对话框里面的确定提交按钮
|
|
|
this.dialogVisible=false;
|
|
|
this.status=1
|
|
|
console.log(this.status);
|
|
|
},
|
|
|
|
|
|
- commit2(){
|
|
|
+ commit2(val){ //立项撤回对话框里面的确定撤回按钮
|
|
|
this.dialogVisible1=false;
|
|
|
this.status--
|
|
|
console.log(this.status);
|
|
|
},
|
|
|
|
|
|
- handleSelectionChange(val) {
|
|
|
+ handleSelectionChange(val) { //批量选择功能后续可能用到
|
|
|
console.log(val);
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
- paApply(){
|
|
|
+ getOption(){ //获取下拉框的值
|
|
|
+ let param={
|
|
|
+ uid:this.$store.state.userid
|
|
|
+ }
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api+'',param)
|
|
|
+ .then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ },err=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ paApply(val){ //查看详情按钮
|
|
|
+ console.log(val);
|
|
|
this.$router.push('/projectApplicationDetails')
|
|
|
},
|
|
|
- apply(){
|
|
|
+ apply(){ //项目立项申请按钮
|
|
|
this.$router.push('/projectApplicationApplyMain')
|
|
|
},
|
|
|
- // 获取下拉框数据
|
|
|
- getDate(){
|
|
|
- // this.ajax
|
|
|
- // .get('/getCreationSelect')
|
|
|
- // .then(res=>{
|
|
|
- // const p=res.data
|
|
|
- // console.log(p);
|
|
|
- // this.options=p[0]
|
|
|
- // this.options1=p[0]
|
|
|
- // this.options2=p[0]
|
|
|
- // this.options3=p[0]
|
|
|
- // this.options4=p[0]
|
|
|
- // },err=>{
|
|
|
- // console.log(err);
|
|
|
- // })
|
|
|
+ getData(){ //获取表格数据
|
|
|
+ let param={
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ }
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api+'',param)
|
|
|
+ .then(res=>{
|
|
|
+ const p=res.data
|
|
|
+ },err=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
},
|
|
|
- del() {
|
|
|
+ del(val) { //表格删除按钮,点击显示删除对话框
|
|
|
this.dialogVisible2=true
|
|
|
+ thsi.iid=val //将要删除的id进行存储供删除对话框使用
|
|
|
},
|
|
|
- dialogDel(){
|
|
|
- this.dialogVisible2=false
|
|
|
+ dialogDel(val){ //确定删除这个项目
|
|
|
+ let param={
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ nid:this.iid
|
|
|
+ }
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api+"",param)
|
|
|
+ .then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.dialogVisible2=false
|
|
|
+ },err=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- value:{
|
|
|
+ watch:{ //监视选择框的变化,实施刷新表格数据
|
|
|
+ options:{
|
|
|
handler(){
|
|
|
immediate:true
|
|
|
deep:true
|
|
|
- this.getAccountListByPage()
|
|
|
+ this.getData()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- mounted(){
|
|
|
- this.getDate()
|
|
|
+ mounted(){ //跳转到此页面立刻获取数据
|
|
|
+ this.getData(); //获取表格数据
|
|
|
+ this.getOption(); //获取下拉框数据}
|
|
|
}
|
|
|
|
|
|
}
|