| | |
| | | <!-- |
| | | * @Date: 2025-06-18 09:17:09 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-07-20 12:34:42 |
| | | * @LastEditTime: 2025-07-20 20:29:18 |
| | | * @FilePath: /mdmweb/src/views/tasks/dncreturnfiles.vue |
| | | --> |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" |
| | | @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange"> |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" |
| | | @selection-change="selectionChange"> |
| | | <template #menu-left> |
| | | <el-button type="primary" plain @click="exportWebSite">导出回传涉密网</el-button> |
| | | <el-button type="primary" plain @click="reassign">挂载车床程序库</el-button> |
| | | <el-button type="primary" plain @click="exportExcel">导出到EXCEL</el-button> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-button type="primary" text size="default" |
| | | @click.stop="handleAction(scope.row, scope.index, 1)">接受 |
| | | <el-button type="primary" text size="default" @click.stop="handleAction(scope.row, scope.index, 1)">接受 |
| | | </el-button> |
| | | <el-button type="danger" text size="default" |
| | | @click.stop="handleAction(scope.row, scope.index, 0)">拒绝 |
| | | <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">拒绝 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | label: '文件固化状态', |
| | | prop: 'isCured', |
| | | formatter: (val, value, label) => { |
| | | return `${val==0?'未固化':"已固化"}`; |
| | | return `${val == 0 ? '未固化' : "已固化"}`; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleAction (row, index, flag) { |
| | | handleAction(row, index, flag) { |
| | | // 处理接受或拒绝操作 |
| | | let ids = [row.id].toString(); |
| | | if(flag) { |
| | | if (flag) { |
| | | accept({ ids }).then(() => { |
| | | this.$message.success(`操作成功: ${row.name}`); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }).catch(() => { |
| | | this.$message.error(`操作失败: ${row.name}`); |
| | | this.$refs.crud.refreshChange(); |
| | | }); |
| | | } else { |
| | | reject({ ids }).then(() => { |
| | | this.$message.success(`操作成功: ${row.name}`); |
| | | }).catch(() => { |
| | | this.$message.error(`操作失败: ${row.name}`); |
| | | this.$refs.crud.refreshChange(); |
| | | }); |
| | | this.$confirm('确定拒绝?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | reject({ ids }).then(() => { |
| | | this.$message.success(`操作成功: ${row.name}`); |
| | | }).catch(() => { |
| | | this.$message.error(`操作失败: ${row.name}`); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | selectionChange (list) { |
| | | selectionChange(list) { |
| | | this.selectedList = list; |
| | | }, |
| | | exportWebSite() { |