| | |
| | | <div class="btn-line"> |
| | | <el-button type="primary" @click="addProject">新建项目</el-button> |
| | | <el-button type="primary" v-if="editShow" @click="editProject">编辑项目</el-button> |
| | | <el-button type="primary" @click="onSubmit">查看详情</el-button> |
| | | <el-button type="primary" @click="showDetail">查看详情</el-button> |
| | | |
| | | </div> |
| | | |
| | |
| | | :total="total"> |
| | | </el-pagination> |
| | | |
| | | <el-dialog @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> |
| | | <el-dialog v-if="dialog_1" @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> |
| | | <newProject @closeNewProject="closeNewProject" v-bind:rowData="rowData" ref="newProject_"></newProject> |
| | | </el-dialog> |
| | | <el-dialog v-if="dialog_2" @close="Cancel2" width="70%" top="50px" :visible.sync="dialog_2" append-to-body> |
| | | <prodetail @closeNewProject="closeDetail" v-bind:rowData="detailData" ref="newProject2_"></prodetail> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import newProject from '../components/popup/newProject.vue' |
| | | import prodetail from '../components/popup/prodetail.vue' |
| | | export default { |
| | | |
| | | components: { |
| | | newProject |
| | | newProject, |
| | | prodetail |
| | | }, |
| | | data() { |
| | | return { |
| | | editShow: true, |
| | | rowData:undefined, |
| | | |
| | | loading_table: false, |
| | | query: "", |
| | | rowData:undefined, |
| | | detailData:undefined, |
| | | dialog_1: false, |
| | | dialog_2: false, |
| | | pagenum: 1, |
| | | pagesize: 15, |
| | | total: 0, |
| | |
| | | }, |
| | | methods: { |
| | | Cancel() { |
| | | this.$refs.newProject_.Cancel(); |
| | | this.dialog_1 = false; |
| | | }, |
| | | Cancel2() { |
| | | this.dialog_2 = false; |
| | | this.closeDetail(); |
| | | }, |
| | | closeDetail() { |
| | | this.detailData = undefined; |
| | | }, |
| | | showDetail() { |
| | | if(!this.selected){ |
| | | |
| | | this.$message({message:'请选中一条未启动的项目', type: 'warning'}); |
| | | return; |
| | | } |
| | | this.dialog_2 = true; |
| | | }, |
| | | tableChange(val) { |
| | | this.selected = val; |
| | | if (this.selected.userId == this.userId) { |
| | | this.detailData = val; |
| | | // this.editShow = true; |
| | | if (this.selected.userId == this.userId) { |
| | | this.editShow = true; |
| | | }else { |
| | | this.editShow = false; |
| | |
| | | }, |
| | | addProject() { |
| | | this.dialog_1 = true; |
| | | |
| | | this.rowData = {}; |
| | | }, |
| | | editProject() { |
| | | if(!this.selected || this.selected.status != "edit"){ |
| | |
| | | |
| | | |
| | | },closeNewProject() { |
| | | this.dialog_1 = false |
| | | this.dialog_1 = false; |
| | | query_(); |
| | | }, |
| | | |
| | | } |