¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Date: 2025-06-17 15:22:15 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-06-17 15:23:02 |
| | | * @FilePath: /mdmweb/src/api/basesetting/produceplan.js |
| | | */ |
| | | import request from '@/axios'; |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/blade-mdm/producedivision/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | }, |
| | | }); |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2025-06-17 11:44:52 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-06-17 16:16:28 |
| | | * @FilePath: /mdmweb/src/views/basesetting/produceplan.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"> |
| | | <template #menu-left> |
| | | <el-button type="primary" plain @click="importAction">导å
¥ |
| | | </el-button> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-button type="primary" text size="default" v-if="permission.flow_model_update" |
| | | @click.stop="handleAction(scope.row, scope.index)">å®¡æ¹ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from '@/api/basesetting/produceplan'; |
| | | import { mapGetters } from 'vuex'; |
| | | export default { |
| | | name: 'ProducePlan', |
| | | data() { |
| | | return { |
| | | // Define your data properties here |
| | | option: { |
| | | // Define your Avue CRUD options here |
| | | addBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | columnBtn: false, |
| | | tip: false, |
| | | // simplePage: true, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | dialogWidth: '60%', |
| | | // tree: true, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | // viewBtn: true, |
| | | menuWidth: 320, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: 'ç¨åºåç§°', |
| | | prop: 'name', |
| | | type: 'input', |
| | | search: true, |
| | | searchRange: true, |
| | | searchSpan: 8, |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: '人ååç§°', |
| | | prop: 'name', |
| | | type: 'input', |
| | | search: true, |
| | | searchRange: true, |
| | | searchSpan: 8, |
| | | hide: true, |
| | | }, |
| | | // { |
| | | // label: 'åºå·', |
| | | // prop: 'index', |
| | | // type: 'index', |
| | | // }, |
| | | { |
| | | label: 'é¶ç»ä»¶ä»£ç ', |
| | | prop: 'id', |
| | | type: '', |
| | | }, |
| | | { |
| | | label: 'ä¸ä¸ç»é¿', |
| | | prop: 'teamLeaderName', |
| | | type: '', |
| | | }, |
| | | { |
| | | label: 'ç¼å¶ï¼å·¥èºå)', |
| | | prop: 'teamLeaderName', |
| | | type: '', |
| | | }, |
| | | { |
| | | label: 'æ ¡å¯¹ï¼å·¥èºå)', |
| | | prop: 'checkerName', |
| | | type: '', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸(é«å¸)', |
| | | prop: 'seniorName', |
| | | type: '', |
| | | }, |
| | | |
| | | // Add more columns as needed |
| | | ], |
| | | }, |
| | | loading: false, |
| | | data: [], // This will hold the data for the tables |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | form: {}, // This will hold the form data |
| | | query: {}, // This will hold the search query |
| | | }; |
| | | }, |
| | | methods: { |
| | | // Define your methods here |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | console.log('searchChange', params); |
| | | console.log(params); |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | currentChange() { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange() { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const query = { |
| | | ...this.query, |
| | | // category: params.category ? flowCategory(params.category) : null, |
| | | mode: this.mode, |
| | | }; |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | importAction() { |
| | | // Logic for importing data |
| | | this.$message.success('导å
¥åè½å°æªå®ç°'); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // Code to run when the component is mounted |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | <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"> |
| | | @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template #menu-left> |
| | | <el-button type="primary" plain @click="reassign">éæ°ææ´¾ |
| | | </el-button> |
| | |
| | | optionApprove: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | |
| | | |
| | | { |
| | | label: '审æ¹ç»æ', |
| | | prop: 'approve', |
| | |
| | | { label: '驳å', value: 'N' }, |
| | | ], |
| | | rules: [{ required: true, message: 'è¯·éæ©å®¡æ¹ç»æ', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ä¸ä¸å®¡æ¹ç¨æ·', |
| | | prop: 'assignee', |
| | | type: 'select', |
| | | // dicUrl: '/blade-system/user/page', |
| | | span: 24, |
| | | dicData: [ |
| | | |
| | | ], |
| | | // rules: [{ required: true, message: 'è¯·éæ©ä¸ä¸å®¡æ¹ç¨æ·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | selectionList: [], |
| | | parentId: 0, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | // viewBtn: true, |
| | | menuWidth: 320, |
| | | dialogClickModal: false, |
| | | |
| | | column: [ |
| | | { |
| | | label: 'å建æ¶é´', |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'taskId', |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: 'ä»»å¡åç§°', |
| | | prop: 'taskName', |
| | |
| | | width: 100, |
| | | prop: 'processDefinitionName', |
| | | }, |
| | | { |
| | | label: 'å®ä¾ç¼å·', |
| | | width: 100, |
| | | type: 'processInstanceId', |
| | | }, |
| | | |
| | | { |
| | | label: 'æºåº', |
| | | width: 100, |
| | | type: 'tree', |
| | | prop: '', |
| | | formatter: (val, value, label) => { |
| | | return `${val?.variables?.machineCode}`; |
| | | }, |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | width: 100, |
| | | type: 'tree', |
| | | prop: '', |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | width: 100, |
| | | width: 200, |
| | | prop: 'createTime', |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: 'å°è¾¾æè¿°', |
| | | width: 100, |
| | | width: 200, |
| | | prop: 'comment', |
| | | }, |
| | | { |
| | |
| | | this.row = row |
| | | console.log('handleAction', row, index); |
| | | }, |
| | | handleSubmit (form,done) { |
| | | handleSubmit(form, done) { |
| | | approve({ |
| | | ...this.formApprove, |
| | | taskId: this.row.taskId, |
| | |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | console.log('searchChange', params); |
| | | params.createTimeBegin = params.createTime[0] || ''; |
| | | params.createTimeEnd = params.createTime[1] || ''; |
| | | params.createTimeBegin = params?.createTime?.[0] || ''; |
| | | params.createTimeEnd = params?.createTime?.[1] || ''; |
| | | console.log(params); |
| | | this.onLoad(this.page, params); |
| | | done(); |