| | |
| | | <!-- <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)">编辑</el-button> --> |
| | | <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)" |
| | | v-if="row.candidateState === 2 && row.evaluateState === 0">发布</el-button> |
| | | <el-button type="primary" v-if="row.type === 0 && row.candidateState === 0" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button> |
| | | <el-button type="primary" v-if="row.type === 0 && row.candidateState === 0" text plain icon="el-icon-plus" |
| | | @click="addCandidateHandle(row)">新增候选人</el-button> |
| | | <!-- <el-button type="primary" text plain icon="el-icon-download">导出</el-button> --> |
| | | <el-button type="danger" text plain icon="el-icon-delete" @click="rowDel(row)">删除</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 发布弹窗 --> |
| | | <el-dialog v-model="dialogVisible" title="发布" width="500px"> |
| | | <el-form :model="publicForm"> |
| | | <el-form-item label="评优评先截止时间:"> |
| | | <el-form :model="publicForm" :rules="publicRules" ref="publicFormRef"> |
| | | <el-form-item label="评优评先截止时间:" prop="publicData"> |
| | | <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间" |
| | | value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" /> |
| | | </el-form-item> |
| | |
| | | dialogVisible: false, |
| | | publicForm: { |
| | | publicData: '', |
| | | }, |
| | | publicRules: { |
| | | publicData: [ |
| | | { required: true, message: '请选择发布时间', trigger: 'click' }, |
| | | ] |
| | | }, |
| | | isAddDialogVisible: false, |
| | | addParams: {}, |
| | |
| | | }, |
| | | // 发布 |
| | | timeSubmit() { |
| | | const { id } = this.rowData; |
| | | const params = { |
| | | id, |
| | | // candidateState: 1, |
| | | evaluateState: 1, |
| | | evaluateCutoffTime: this.publicForm.publicData, |
| | | }; |
| | | update(params).then( |
| | | res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.refreshChange(); |
| | | }, |
| | | error => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: error, |
| | | }); |
| | | } |
| | | ); |
| | | this.dialogVisible = false; |
| | | this.$refs.publicFormRef.validate(valid => { |
| | | if (!valid) return |
| | | const { id } = this.rowData; |
| | | const params = { |
| | | id, |
| | | // candidateState: 1, |
| | | evaluateState: 1, |
| | | evaluateCutoffTime: this.publicForm.publicData, |
| | | }; |
| | | update(params).then( |
| | | res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.refreshChange(); |
| | | }, |
| | | error => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: error, |
| | | }); |
| | | } |
| | | ); |
| | | this.dialogVisible = false; |
| | | }) |
| | | }, |
| | | addCandidateHandle(row) { |
| | | this.addCandidateParams = { |