| | |
| | | <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"> |
| | | <template #menu-left> |
| | | <!-- |
| | | <el-button type="primary" :disabled="this.selection.length==0" plain @click="handleDelBatch">批量删除</el-button> |
| | |
| | | import NProgress from 'nprogress'; |
| | | import 'nprogress/nprogress.css'; |
| | | export default { |
| | | name: 'MachineReturnFileOp', |
| | | name: 'approveTablePrint', |
| | | data() { |
| | | return { |
| | | page: { |
| | | size: 10, |
| | | current: 1, |
| | | pageSize: 10,// |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | form: {}, |
| | |
| | | // tree: true, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | selection: false, |
| | | // viewBtn: true, |
| | | menuWidth: 140, |
| | | menu: true, |
| | |
| | | hide: false, |
| | | } |
| | | ], |
| | | selection: [], |
| | | }, |
| | | |
| | | selection: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | selectionChange (list) { |
| | | this.selection = list; |
| | | }, |
| | | |
| | | handleExport(row,index) { |
| | | //审批表下载 |
| | | this.$confirm('是否导出审批表?', '提示', { |
| | |
| | | let name = res.headers['content-disposition'].split('filename=')[1] |
| | | //console.log(res.headers['content-disposition'].split('filename=')[1]); |
| | | name = decodeURI(name) |
| | | console.log(name) |
| | | //console.log(name) |
| | | downloadFile(res.data, `${name}`); |
| | | NProgress.done(); |
| | | }); |
| | |
| | | searchChange(params, done) { |
| | | let data = {} |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | console.log('searchChange', params); |
| | | this.page.current = 1; |
| | | //console.log('searchChange', params); |
| | | params.createTimeBegin = params?.createTime?.[0] || ''; |
| | | params.createTimeEnd = params?.createTime?.[1] || ''; |
| | | |
| | |
| | | this.onLoad(this.page, data); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | // this.onLoad(); |
| | | currentChange(current) { |
| | | this.page.currentPage = current; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | sizeChange(size) { |
| | | this.page.pageSize = size; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | |
| | | /** * 页面加载时获取数据 |
| | | */ |
| | | onLoad(page, params = {}) { |
| | | console.log('onLoad', page, params); |
| | | //console.log('onLoad', page, params); |
| | | const query = { |
| | | ...this.query, |
| | | // category: params.category ? flowCategory(params.category) : null, |
| | |
| | | } catch (error) { |
| | | console.error('日期格式化错误', error); |
| | | } |
| | | |
| | | //alert(page.size) |
| | | this.loading = true; |
| | | getDispatchTaskList(page.current, page.size, Object.assign(query, params)).then(res => { |
| | | getDispatchTaskList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: '关键字', |
| | | prop: 'keyword', |
| | | label: '零组件号', |
| | | prop: 'drawingNo', |
| | | search: true, |
| | | searchType: 'input', |
| | | hide: true, |
| | |
| | | data = { |
| | | createTimeBegin: params.createTimeBegin || undefined, |
| | | createTimeEnd: params.createTimeEnd || undefined, |
| | | keyword: params.keyword || undefined, |
| | | drawingNo: params.drawingNo || undefined, |
| | | myProcessName: params.myProcessName || undefined |
| | | } |
| | | this.query = data |
| | |
| | | @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" |
| | | @selection-change="selectionChange"> |
| | | <!--v-model:search="search" |
| | | <template #search="{ size }"> |
| | | <el-tag>标题</el-tag> |
| | | <el-input placeholder="自定义输入框" |
| | | :size="size" |
| | | style="width: 200px" |
| | | v-model:value="search.slot"></el-input> |
| | | </template> --> |
| | | |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | |
| | | //tableData: [], |
| | | viewRow: {}, |
| | | page: { |
| | | pageSize: 10, |
| | | pageSize: 10,// |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | |
| | | ], |
| | | }, |
| | | |
| | | selectedList: [], |
| | | dialogVisible: false, |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | //this.option.column[0].disabled = true; |
| | | //this.option.column[0].value = '2025-08-31'; |
| | | |
| | | getDeptData().then(res => { |
| | | this.option.column[1].dicData = res.data.data; |
| | | }, () => { |
| | |
| | | }, |
| | | loading: true, |
| | | mypage: { |
| | | size: 10, |
| | | current: 1, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | fileViewModel:false, |
| | |
| | | }, |
| | | nodeClick(data) { |
| | | //this.treeDeptId = data.id; |
| | | this.mypage.current = 1; |
| | | this.mypage.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | }, |
| | | getQueryObj(){ |
| | |
| | | param.createTimeBegin = param.createTime[0]; |
| | | param.createTimeEnd = param.createTime[1]; |
| | | } |
| | | param.current = this.mypage.currentPage; |
| | | param.size = this.mypage.pageSize; |
| | | return param; |
| | | }, |
| | | handleExport() { |
| | |
| | | //this.onLoad(this.mypage); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.mypage.current = 1; |
| | | this.mypage.currentPage = 1; |
| | | this.onLoad(); |
| | | done(); |
| | | }, |
| | | currentChange(current) { |
| | | this.mypage.current = current; |
| | | this.mypage.currentPage = current; |
| | | }, |
| | | sizeChange(size) { |
| | | this.mypage.size = size; |
| | | this.mypage.pageSize = size; |
| | | }, |
| | | refreshChange() { |
| | | |
| | |
| | | @click="$refs.crud.rowAdd()" |
| | | >新 增 |
| | | </el-button> |
| | | <!-- |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | --> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | @selection-change="selectionChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <!-- el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">导出</el-button> |
| | | <el-button type="primary" v-if="this.search.dirType!='REC'" :disabled="this.selection.length==0" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">接收已选</el-button> |
| | | --> |
| | | </template> |
| | | <!-- |
| | | <template #menu="scope"> |
| | | <el-button type="primary" v-if="scope.row.dirType==='TEMP'" text size="default" icon="el-icon-document-delete" @click.stop="rejectBtn(scope.row, scope.index)">拒绝</el-button> |
| | | <el-button type="primary" v-if="scope.row.dirType==='TEMP'" text size="default" icon="el-icon-document-add" @click.stop="acceptBtn(scope.row, scope.index)">接收</el-button> |
| | | <el-button type="primary" v-if="scope.row.status==1" text size="default" icon="el-icon-delete" @click.stop="handleDel(scope.row)">删除</el-button> |
| | | </template> |
| | | --> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | |
| | | emptyBtn: false, |
| | | searchLabelWidth: "80", |
| | | searchSpan: 4, |
| | | menu:false, |
| | | menu:true, |
| | | width:'100%', |
| | | column: [ |
| | | { |
| | |
| | | this.selection = selection; |
| | | }, |
| | | |
| | | receiveAll() { |
| | | //接收符合条件的所有数据 |
| | | this.$confirm('确定要接收符合条件的所有文件吗?', { //同接收接口相同 |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | //调用接口 |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/machinefile/file/temp-accept-all', |
| | | method: 'post', |
| | | params: {} |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.onLoad(); |
| | | } |
| | | ); |
| | | }) |
| | | handleDel(row) { |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/gkw/machinebacktask/remove', |
| | | method: 'post', |
| | | params: {ids: row.id}, |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.onLoad(); |
| | | done(); |
| | | }, |
| | | error => { |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | receiveBtn() { |
| | | if(this.selection.length == 0) { |
| | | ElMessage({message: '请选择数据',type: 'error'}) |
| | | } |
| | | var ids = []; |
| | | this.selection.forEach(item=> { |
| | | ids.push(item.id); |
| | | }) |
| | | this.$confirm('确定要接收吗?', { //同接收接口相同 |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | //调用接口 |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/machinefile/collect/temp-accept', |
| | | method: 'post', |
| | | params: {ids: ids.join(',')}, |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.onLoad(); |
| | | } |
| | | ); |
| | | }) |
| | | }, |
| | | |
| | | |
| | | searchReset() { |
| | | //this.onLoad(this.mypage); |