| | |
| | | <template> |
| | | <basic-container> |
| | | <template v-if="isResult"> |
| | | <template v-if="curIndex === 0"> |
| | | <avue-tabs ref="tabs" :option="taskTypeList" @change="tabChange"></avue-tabs> |
| | | <avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading" |
| | | :data="data" :permission="permissionList" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate" |
| | |
| | | </el-button> --> |
| | | </template> |
| | | <template #menu="{ row }"> |
| | | <el-button type="primary" icon="el-icon-plus" size="small" @click="handleTaskResult(row)"> |
| | | <el-button type="primary" icon="el-icon-setting" text @click="handleTaskSetting(row)"> |
| | | 考核设置 |
| | | </el-button> |
| | | <el-button type="primary" icon="el-icon-view" text @click="handleTaskResult(row)"> |
| | | 考核结果 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </template> |
| | | <template v-else-if="curIndex === 1"> |
| | | <assessmentTaskSetting :params="resultParams" @changeIs="changeIs"/> |
| | | </template> |
| | | <template v-else> |
| | | <taskResult :params="resultParams" @changeIs="changeIs" /> |
| | |
| | | import 'nprogress/nprogress.css'; |
| | | import taskResult from './components/taskResult.vue' |
| | | import addTaskDialog from "./components/addTaskDialog.vue"; |
| | | import assessmentTaskSetting from "./components/assessmentTaskSetting.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | taskResult, |
| | | addTaskDialog |
| | | addTaskDialog, |
| | | assessmentTaskSetting |
| | | }, |
| | | data() { |
| | | return { |
| | | isResult: true, |
| | | curIndex: 0, |
| | | form: {}, |
| | | query: {}, |
| | | search: {}, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleTaskResult(row) { |
| | | this.isResult = false; |
| | | handleTaskSetting(row) { |
| | | this.curIndex = 1; |
| | | this.resultParams = row |
| | | this.resultParams.type = this.defaultTaskType |
| | | }, |
| | | changeIs(is) { |
| | | this.isResult = is |
| | | handleTaskResult(row) { |
| | | this.curIndex = 2; |
| | | this.resultParams = row |
| | | this.resultParams.type = this.defaultTaskType |
| | | }, |
| | | changeIs(num) { |
| | | this.curIndex = num |
| | | this.$nextTick(() => { |
| | | this.$refs.tabs.active = this.defaultTaskType.toString() |
| | | }) |