| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menuFixed: 'right', |
| | | labelWidth: '120', |
| | | column: [ |
| | | { |
| | | label: "主键", |
| | |
| | | { |
| | | label: "候选人数量", |
| | | prop: "candidateNum", |
| | | type: "input", |
| | | type: "textarea", |
| | | span: 24, |
| | | minWidth: '100px', |
| | | // prop: { |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menuFixed: 'right', |
| | | labelWidth: '120', |
| | | column: [ |
| | | { |
| | | label: "主键", |
| | |
| | | { |
| | | label: "评定人数量", |
| | | prop: "candidateNum", |
| | | type: "input", |
| | | type: "textarea", |
| | | span: 24, |
| | | minWidth: '100px', |
| | | slot: 'true', |
| | | formatter: (row, value) => { |
| | | let num = 0 |
| | | if (value === void 0) { |
| | |
| | | </template> |
| | | <template #menu="{ size, row, index }"> |
| | | <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.status === 2">发布</el-button> |
| | | <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)" |
| | | v-if="row.status === 2">发布</el-button> |
| | | <!-- <el-button type="primary" v-if="row.type === 0" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button> --> |
| | | <el-button type="primary" text plain icon="el-icon-download">导出</el-button> |
| | | </template> |
| | |
| | | <!-- 新增编辑弹窗 --> |
| | | <addDialog :params="addParams" @refreshTable="this.onLoad" /> |
| | | <!-- 新增候选人 --> |
| | | <addCandidate :params="addCandidateParams" @refreshTable="this.onLoad" /> |
| | | <addCandidate :params="addCandidateParams" @refreshTable="this.onLoad" /> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | type: n, |
| | | }; |
| | | // 更改option |
| | | !n ? (this.option = option) : (this.option = sectionOption) |
| | | !n ? (this.option = option) : (this.option = sectionOption) |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | |
| | | if (['edit', 'view'].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | if (type === 'view') { |
| | | this.deptData().then(deptRes => { |
| | | const candidates = []; |
| | | res.data.data.candidateNum.forEach(item => { |
| | | const value = deptRes.find(dept => dept.id === item.deptId); |
| | | candidates.push(`${value.title}: ${item.val || 0}人`); |
| | | }); |
| | | this.form.candidateNum = candidates.join('、'); |
| | | }); |
| | | const candidates = []; |
| | | res.data.data.candidateNum.forEach(item => { |
| | | const users = [] |
| | | item.users.forEach(item => users.push(item.name)) |
| | | candidates.push(`${item.deptName}(${item.val || 0}人): ${users.join('、')}`); |
| | | }) |
| | | this.form.candidateNum = candidates.join('\n'); |
| | | } |
| | | this.form = res.data.data; |
| | | }); |