|
|
@@ -59,7 +59,6 @@
|
|
|
title="确定要删除此角色吗?"
|
|
|
@confirm="remove(row)"
|
|
|
v-if="$hasPermission('main:team:delete')"
|
|
|
-
|
|
|
>
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
@@ -75,138 +74,141 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
|
|
|
-import edit from './components/edit.vue';
|
|
|
-import setclasses from './components/setclasses.vue';
|
|
|
-import { getteampage, deleteteam } from '@/api/workforceManagement/team';
|
|
|
-import search from './components/search.vue';
|
|
|
-export default {
|
|
|
- mixins: [tabMixins],
|
|
|
- components: {
|
|
|
- search,
|
|
|
- edit,
|
|
|
- setclasses
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- selection: [],
|
|
|
- columns: [
|
|
|
- {
|
|
|
- width: 45,
|
|
|
- type: 'selection',
|
|
|
- columnKey: 'selection',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- width: 45,
|
|
|
- type: 'index',
|
|
|
- columnKey: 'index',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- label: '编码'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称',
|
|
|
- prop: 'name'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- label: '所属工厂',
|
|
|
- prop: 'factoryName'
|
|
|
- },
|
|
|
+ import edit from './components/edit.vue';
|
|
|
+ import setclasses from './components/setclasses.vue';
|
|
|
+ import { getteampage, deleteteam } from '@/api/workforceManagement/team';
|
|
|
+ import search from './components/search.vue';
|
|
|
+ export default {
|
|
|
+ mixins: [tabMixins],
|
|
|
+ components: {
|
|
|
+ search,
|
|
|
+ edit,
|
|
|
+ setclasses
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ selection: [],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ prop: 'name'
|
|
|
+ },
|
|
|
|
|
|
- // {
|
|
|
- // label: '所属厂房',
|
|
|
- // prop: 'workshopPlanName'
|
|
|
- // },
|
|
|
+ {
|
|
|
+ label: '所属工厂',
|
|
|
+ prop: 'factoryName'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- label: '所属产线',
|
|
|
- prop: 'productionLineName'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '工作中心',
|
|
|
- prop: 'workCenterNames'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '所属厂房',
|
|
|
+ // prop: 'workshopPlanName'
|
|
|
+ // },
|
|
|
|
|
|
+ {
|
|
|
+ label: '所属产线',
|
|
|
+ prop: 'productionLineName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '工作中心',
|
|
|
+ prop: 'workCenterNames'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- label: '工艺类型',
|
|
|
- prop: 'produceVersionName'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '人数',
|
|
|
- prop: 'userNumber'
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 220,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ],
|
|
|
- dict: {
|
|
|
- enabled: {
|
|
|
- 1: '生效',
|
|
|
- 0: '未生效'
|
|
|
+ {
|
|
|
+ label: '工艺类型',
|
|
|
+ prop: 'produceVersionName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '班组长',
|
|
|
+ prop: 'leaderUserName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '人数',
|
|
|
+ prop: 'userNumber'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 220,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ dict: {
|
|
|
+ enabled: {
|
|
|
+ 1: '生效',
|
|
|
+ 0: '未生效'
|
|
|
+ },
|
|
|
+ groupId: []
|
|
|
},
|
|
|
- groupId: []
|
|
|
- },
|
|
|
- pageSize: this.$store.state.tablePageSize,
|
|
|
- cacheKeyUrl: '000a249c-workforceManagement-team'
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- datasource({ page, where, limit }) {
|
|
|
- let data = getteampage({
|
|
|
- ...where,
|
|
|
- pageNum: page,
|
|
|
- size: limit
|
|
|
- });
|
|
|
- return data;
|
|
|
- },
|
|
|
- openEdit(type, row) {
|
|
|
- this.$refs.edit.open(type, row);
|
|
|
+ pageSize: this.$store.state.tablePageSize,
|
|
|
+ cacheKeyUrl: '000a249c-workforceManagement-team'
|
|
|
+ };
|
|
|
},
|
|
|
- remove(row) {
|
|
|
- let par = [row.id];
|
|
|
- deleteteam(par)
|
|
|
- .then((message) => {
|
|
|
- this.$message.success(message);
|
|
|
- this.done();
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- this.$message.error(e.message);
|
|
|
+ methods: {
|
|
|
+ datasource({ page, where, limit }) {
|
|
|
+ let data = getteampage({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
});
|
|
|
- },
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ openEdit(type, row) {
|
|
|
+ this.$refs.edit.open(type, row);
|
|
|
+ },
|
|
|
+ remove(row) {
|
|
|
+ let par = [row.id];
|
|
|
+ deleteteam(par)
|
|
|
+ .then((message) => {
|
|
|
+ this.$message.success(message);
|
|
|
+ this.done();
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.$message.error(e.message);
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- /* 刷新表格 */
|
|
|
- reload(where) {
|
|
|
- this.$refs.table.reload({ page: 1, where: where });
|
|
|
- },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.table.reload({ page: 1, where: where });
|
|
|
+ },
|
|
|
|
|
|
- done() {
|
|
|
- this.$refs.table.reload({
|
|
|
- page: 1
|
|
|
- });
|
|
|
- },
|
|
|
- openclass() {
|
|
|
- if (this.selection.length <= 0) {
|
|
|
- this.$message.error('请选择班组');
|
|
|
- return;
|
|
|
+ done() {
|
|
|
+ this.$refs.table.reload({
|
|
|
+ page: 1
|
|
|
+ });
|
|
|
+ },
|
|
|
+ openclass() {
|
|
|
+ if (this.selection.length <= 0) {
|
|
|
+ this.$message.error('请选择班组');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let list = this.selection.map((n) => n.id);
|
|
|
+ this.$refs.setclasses.open(list);
|
|
|
}
|
|
|
- let list = this.selection.map((n) => n.id);
|
|
|
- this.$refs.setclasses.open(list);
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|