123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689 |
- <template>
- <!-- 项目立项申请 -->
- <div class="projectApplication">
- <div class="pAHeader">
- <div class="pAHeader1">项目立项申请</div>
- <el-button style="font-size: 16px;" @click="apply">项目立项申请</el-button>
- </div>
- <hr>
- <!-- 搜索框开始 -->
- <div class="selects">
- <div class="selectsBlock">
- <div class="selectLabel">项目筛选</div>
- <el-select v-model="selectInp.filter" @change="getData" placeholder="我的项目">
- <el-option label="所有项目" value=""></el-option>
- <el-option
- v-for="item in options.projectFilter"
- :key="item.courseId"
- :label="item.title"
- :value="item.courseId">
- </el-option>
- </el-select>
- </div>
- <div class="selectsBlock">
- <div class="selectLabel">部门</div>
- <el-select v-model="selectInp.department" @change="getData" placeholder="请选择">
- <el-option label="所有部门" value=""></el-option>
- <el-option
- v-for="item in options.department"
- :key="item.classid"
- :label="item.name"
- :value="item.classid">
- </el-option>
- </el-select>
- </div>
- <div class="selectsBlock">
- <div class="selectLabel">分类</div>
- <el-select v-model="selectInp.sort" @change="getData" placeholder="请选择">
- <el-option label="所有分类" value=""></el-option>
- <el-option
- v-for="item in options.sort"
- :key="item.typeid"
- :label="item.name"
- :value="item.typeid">
- </el-option>
- </el-select>
- </div>
- <div class="selectsBlock">
- <div class="selectLabel">负责人</div>
- <el-select v-model="selectInp.person" @change="getData" placeholder="请选择">
- <el-option label="所有负责人" value=""></el-option>
- <el-option
- v-for="(item,index) in options.person"
- :key="index"
- :label="item.pro_leader"
- :value="item.pro_leader">
- </el-option>
- </el-select>
- </div>
- <div class="selectsBlock">
- <div class="selectLabel">状态</div>
- <el-select v-model="selectInp.state" @change="getData" placeholder="请选择">
- <el-option
- v-for="item in options.state"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- </div>
- <!-- 搜索框结束 -->
- <!-- 表格开始 -->
- <div>
- <el-table
- ref="multipleTable"
- :data="tableData"
- tooltip-effect="dark"
- stripe
- 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="title"
- label="项目名称"
- align="center"
- min-width="10%">
- </el-table-column>
- <el-table-column
- prop="pro_leader"
- align="center"
- label="项目负责人"
- min-width="9%">
- </el-table-column>
- <el-table-column
- prop="name"
- align="center"
- label="所在部门"
- min-width="10%">
- </el-table-column>
- <el-table-column
- prop="money"
- label="预算(万)"
- align="center"
- min-width="8%">
- </el-table-column>
- <el-table-column
- prop="time"
- align="center"
- label="开始时间"
- min-width="11%">
- </el-table-column>
- <el-table-column
- prop="phone"
- align="center"
- label="联系电话"
- min-width="10%">
- </el-table-column>
- <el-table-column
- prop="state"
- label="状态"
- align="center"
- min-width="6%">
- <template #default="scope">
- <div>
- <!-- {{scope.row.name + (scope.row.status==0?"":"(已屏蔽)")}} -->
- <!-- {{ (scope.row.isupload==0?"未审核": scope.row.data==1?"正在审核":"已审核") }} -->
- <span v-if="scope.row.isupload==0">未审核</span>
- <span v-if="scope.row.isupload==1">审核中</span>
- <span v-if="scope.row.isupload==2">已审核</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="operation"
- width="350"
- align="center"
- label="操作"
- >
- <template #default="scope">
- <div class="operations">
- <!-- <el-button type="primary" > -->
- <!-- <el-link class="btt" type="primary" :underline="false"> -->
- <el-button type="primary" size="mini" @click="lookDetail(scope.row.courseId)">查看详情</el-button>
- <!-- <el-button type="primary" size="mini" @click="audit(scope.row)">{{(scope.row.data==1?"审核": scope.row.data==1?"正在审核":"审核")}}</el-button> -->
- <el-button v-show="scope.row.isupload==0" type="primary" style="width: 73.3px;" size="mini" @click="audit(scope.row)">审核</el-button>
- <el-button type="info" style="background-color: #c8c9cc;border-color: #c8c9cc;cursor: no-drop;" v-if="scope.row.isupload==1" size="mini">审核中</el-button>
- <el-button type="info" style="background-color: #c8c9cc;border-color: #c8c9cc;cursor: no-drop;" v-if="scope.row.isupload==2" size="mini">已审核</el-button>
- <el-button type="primary" size="mini" @click="appTable()" >申请表</el-button>
- <el-button type="primary" size="mini" @click="del(scope.row)">删除</el-button>
- <!-- </el-link> -->
- <!-- </el-button> -->
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 表格结束 -->
- <!-- 分页 -->
- <el-pagination
- @current-change="handleCurrentChange"
- :current-page="table.currentPage"
- :page-size="table.packageSize"
- layout=" prev, pager, next"
- background
- class="paginations"
- :total="table.total">
- </el-pagination>
- <!-- 分页结束 -->
- <!-- 立项撤回对话框开始 -->
- <el-dialog
- title="立项撤回提交"
- :visible.sync="dialogVisible1"
- width="700px"
- class="dialogWidth"
- :before-close="init">
- <div class="diaTit">
- <div class="spans">项目名称</div>
- <div class="spanCon">:人工智能分链机器</div>
- <div class="spans" style="margin-left: 50px;">项目负责人</div>
- <div class="spanCon">:徐晓霞</div>
- </div>
- <div class="diaTit1">
- <div class="spans1">所在部门</div>
- <div>
- <el-input v-model="input" placeholder="信通学院"></el-input>
- </div>
- </div>
- <div class="diaTit1">
- <div class="spans1">预算总经费</div>
- <div>
- <el-input v-model="input" placeholder="6000"></el-input>
- </div>
- </div>
- <div class="diaTit1">
- <div class="spans1">联系电话</div>
- <div>
- <el-input v-model="input" placeholder="13854449525"></el-input>
- </div>
- </div>
- <div class="diaTit1">
- <div class="spans1" style="position: relative;top:-20px">撤回意见</div>
- <div>
- <el-input
- type="textarea"
- :rows="4"
- resize="none"
- placeholder="请输入内容"
- v-model="textarea">
- </el-input>
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="commit2" class="AllDialogBtn" >确认提交</el-button>
- <el-button @click="init" class="AllDialogBtn">取消</el-button>
- </div>
- </el-dialog>
- <!-- 立项撤回对话框开始 -->
- <!-- 立项审核对话框开始 -->
- <el-dialog
- title="立项审核"
- :visible.sync="dialogVisible"
- class="dialogWidth"
- :before-close="init">
-
- <div class="diaTit">
- <div class="addDialogLogo">LOGO</div>
- <div class="spans">项目名称</div>
- <div class="spanCon">:{{ auditDialog.projectName }}</div>
- <div class="spans" style="margin-left: 30px;">项目负责人</div>
- <div class="spanCon">:{{ auditDialog.person }}</div>
- </div>
- <div class="diaTit1">
- <div class="spans1">所在部门</div>
- <div>
- <el-input v-model="auditDialog.department" placeholder="信通学院"></el-input>
- </div>
- </div>
- <div class="diaTit1">
- <div class="spans1">预算总经费</div>
- <div>
- <el-input v-model="auditDialog.fund" placeholder="6000"></el-input>
- </div>
- </div>
- <div class="diaTit1">
- <div class="spans1">联系电话</div>
- <div>
- <el-input v-model="auditDialog.tel" placeholder="13854449525"></el-input>
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="commit" class="AllDialogBtn" >确认提交</el-button>
- <el-button @click="init" class="AllDialogBtn">取消</el-button>
- </div>
- </el-dialog>
- <!-- 立项审核对话框结束 -->
- <!-- 删除通知开始 -->
- <el-dialog
- title="删除项目"
- :visible.sync="dialogVisible2"
- width="600px"
- class="addDialog">
- <div class="addDialogLogo">LOGO</div>
- <span class="deleteContent">确定删除项目?</span>
- <span slot="footer" class="dialog-footer">
- <el-button type="primary" @click="dialogDel" class="AllDialogBtn">确认删除</el-button>
- <el-button @click="init" class="AllDialogBtn" >取消</el-button>
- </span>
- </el-dialog>
- <!-- 删除通知结束-->
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- iid:'',
- textarea:'',
- input:'',
- dialogVisible:false,//立项审核
- dialogVisible1:false,//立项撤回提交
- dialogVisible2:false,//删除
- // 分页数据
- table:{
- total:0,
- packageSize:7,
- currentPage:1
- },
- tableData:[], //列表数据
-
- selectInp:{ // 头部搜索框的内容
- filter:'',
- department:'',
- sort:'',
- person:'',
- state:'',
- },
- options:{ //头部搜索框下拉框数据
- projectFilter:[],//项目筛选
- department:[],//部门
- sort:[],//分类
- person:[],//负责人
- state:[//状态
- {
- value:'',
- label:'全部'
- },
- {
- value:0,
- label:'未审核'
- },
- {
- value:1,
- label:'正在审核'
- },
- {
- value:2,
- label:"已审核"
- },
- ],
- },
- auditDialog:{ //审核对话框数据
- projectName:'',
- person:'',
- department:'',
- fund:'',
- tel:''
- }
- }
- },
- methods:{
-
- init(){
- this.dialogVisible=false;
- this.dialogVisible1=false;
- this.dialogVisible2=false;
- },
- audit(val){ //审核按钮
- // if(this.status==-1){
- // this.dialogVisible=true;
- // return
- // }else if(this.status){
- // this.dialogVisible1=true;
- // return
- // }else{
- // this.dialogVisible=true;
- // }
- // console.log(val);
- // this.dialogVisible2=true
- this.iid=val //将要删除的id进行存储供删除对话框使用
- if (val.isupload==0) {
- this.dialogVisible=true;
- // console.log(val);
- this.auditDialog.projectName=val.title;
- this.auditDialog.person=val.pro_leader;
- this.auditDialog.department=val.name;
- this.auditDialog.fund=val.money;
- this.auditDialog.tel=val.phone;
- }
-
-
- },
- appTable(){ //查看申请表
- // window.open("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E9%99%84%E4%BB%B6%202%EF%BC%9A%E5%88%9B%E5%AE%A2%E4%B8%93%E9%A1%B9%E8%B5%84%E9%87%91%E9%A1%B9%E7%9B%AE%E7%94%B3%E8%AF%B7%E8%A1%A8%EF%BC%88%E5%88%9B%E5%AE%A2%E6%B4%BB%E5%8A%A8%EF%BC%891681086540732.doc")
-
- },
- commit(){ //立项审核对话框里面的确定提交按钮
- // console.log(this.iid);
- let param={
- uid:this.$store.state.userInfo.userid,
- pid:this.iid.courseId
- }
- this.ajax
- .post(this.$store.state.api+"/ApproveProject",param)
- .then(res=>{
- // console.log(res);
- this.dialogVisible=false;
- this.$message.success('提交成功')
- this.getData()
- },err=>{
- console.log(err);
- })
- },
- commit2(val){ //立项撤回对话框里面的确定撤回按钮
- this.dialogVisible1=false;
- this.status--
- // console.log(this.status);
- },
- handleSelectionChange(val) { //批量选择功能后续可能用到
- // console.log(val);
- this.multipleSelection = val;
- },
-
- lookDetail(val){ //查看详情按钮
- // console.log(val);
- localStorage.setItem("pid",JSON.stringify(val))
- this.$router.push('/projectApplicationDetails')
- },
- apply(){ //项目立项申请按钮
- this.$router.push('/projectApplicationApplyMain')
- },
- getData(){ //获取表格数据
- let param={
- uid:this.$store.state.userInfo.userid,
- pid:this.selectInp.filter, //筛选
- did:this.selectInp.department, //部门
- tid:this.selectInp.sort, //分类
- leader:this.selectInp.person, //负责人
- st:this.selectInp.state, //审核状态
- textInp:'',
- page:this.table.currentPage, //当前页
- lim:this.table.packageSize //限制获取几条数据
- }
- // return console.log(param);
- // console.log(param)
- this.ajax
- .get(this.$store.state.api+'/SelectAllProject',param)
- .then(res=>{
- console.log(res.data);
- let data=res.data;
- let a=this.options;
- this.tableData=data[0];
- a.projectFilter=data[1];
- a.department=data[2];
- a.sort=data[3];
- a.person=data[4];
- this.table.total=data[5][0].total
-
- },err=>{
- console.log(err);
- })
- },
- del(val) { //表格删除按钮,点击显示删除对话框
- // console.log(val);
- this.dialogVisible2=true
- this.iid=val //将要删除的id进行存储供删除对话框使用
- },
- dialogDel(){ //确定删除这个项目
- // console.log(this.iid)
- if (this.iid.userid == this.$store.state.userInfo.userid) {
- let param={
- uid:this.$store.state.userInfo.userid,
- pid:this.iid.courseId
- }
- this.ajax
- .post(this.$store.state.api+"/DeleteProject",param)
- .then(res=>{
- // console.log(res);
- if (res.data) {
- this.$message.success('删除成功')
- this.getData()
- this.dialogVisible2=false
- return
- }else{
- this.$message.error('删除失败')
- }
- },err=>{
- console.log(err);
- })
- }
-
- },
- handleCurrentChange(val) { //当页数发生改变的时候调用获取列表数据请求
- // console.log(`当前页: ${val}`);
- this.table.currentPage=val
- this.getData()
- },
- },
- watch:{ //监视选择框的变化,实施刷新表格数据
- // options:{
- // handler(){
- // immediate:true
- // deep:true
- // this.getData()
- // }
- // }
- },
- mounted(){ //跳转到此页面立刻获取数据
- this.getData(); //获取表格数据
- }
- }
- </script>
- <style lang="less">
- .projectApplication{
- .el-table::before{
- height: 0;
- }
- .addDialog{ //删除对话框
- font-size: 18px;
- .el-dialog{
- border-radius: 5px;
- overflow: hidden;
- }
- .el-dialog__body{
- display: flex;
- justify-content: center;
- }
- .deleteContent{
- // margin: 30px 0;
- font-size: 22px;
- color: #000;
- }
- .addDialogLogo{
- width: 60px;
- height: 30px;
- display: flex;
- justify-content: center;
- line-height: 30px;
- border-radius: 5px;
- background: #f2f2f2;
- position: absolute;
- left: 20px; top: 15px;
- }
- .el-dialog__header{
- background: #32455b;
- position: relative;
- top: -2px;
- }
- .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;
- font-size: 16px;
- line-height: 40px;
- text-align: left;
-
- }
- }
- .addDialogTit1{
- display: flex;
- justify-content: space-between;
- margin-bottom: 15px;
- }
- .addDialogTit2{
- margin-top: 10px;
- font-size: 16px;
- color: #000;
- text-indent: 2em;
- }
- .addDialogCon{
- margin-top: 20px;
- }
- }
- .dialog-footer{
- display: flex;
- justify-content: center;
- box-sizing: border-box;
- }
- }
- .dialogWidth{ //立项审核对话框
- .el-input__inner{
- width: 300px;
- }
- .el-textarea__inner{
- width: 430px;
- }
- .el-dialog{
- width: 600px;
- border-radius: 5px;
- overflow: hidden;
- }
- .el-dialog__body{
- padding:30px 0px 30px 70px ;
- }
-
- .el-dialog__header{
- background: #32455b;
- }
- .el-dialog__title{
- color: #fff;
- position: relative;
- top: -2px;
- display: flex;
- justify-content: center;
- font-size: 18px;
- }
- .addDialogLogo{
- width: 60px;
- height: 30px;
- display: flex;
- justify-content: center;
- line-height: 30px;
- border-radius: 5px;
- background: #f2f2f2;
- position: absolute;
- left: 20px; top: 15px;
- }
- .diaTit{ //项目名称、负责人
- width: 100%;
- display: flex;
- .spans{
- width: 84px;
- font-size: 16px;
- margin-right: 10px;
- display: inline-block;
- text-align: justify;
- color: #000;
- font-size: 16px;
- text-justify:distribute-all-lines;
- text-align-last: justify;
- transform: translate(0,22%);
- margin-bottom: 10px;
- }
-
- }
- .spanCon{
- font-size: 16px;
- margin-top: 5px;
- color: #a0a0a0;
- width: 150px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .spans1{ //label
- min-width: 84px;
- font-size: 16px;
- color: #000;
- margin-right: 10px;
- display: inline-block;
- text-align: justify;
- text-justify:distribute-all-lines;
- text-align-last: justify;
- transform: translate(0,22%);
- }
-
- .diaTit1{ //label和input框
- display: flex;
- width: 80%;
- margin-top: 20px;
-
- }
-
- .dialog-footer{
- width: 100%;
- display: flex;
- justify-content: center;
- margin-bottom: 10px;
-
- }
- }
-
- }
- </style>
|