|
|
@@ -24,30 +24,6 @@
|
|
|
新建
|
|
|
</el-button>
|
|
|
</template>
|
|
|
-
|
|
|
- <template v-slot:roleList="{ row }">
|
|
|
- <el-tag
|
|
|
- v-for="item in row.roleList"
|
|
|
- :key="item.id"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- :disable-transitions="true"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- <!-- 状态列 -->
|
|
|
- <template v-slot:enable="{ row }">
|
|
|
- <el-switch
|
|
|
- v-model="row.enable"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#ff4949"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- @change="changeEnable(row)"
|
|
|
- >
|
|
|
- </el-switch>
|
|
|
- </template>
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
|
@@ -83,7 +59,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { pageUsers } from '@/api/system/user';
|
|
|
+ import { getGroupPage , removeItem } from '@/api/material/list';
|
|
|
import ListEdit from './components/list-edit.vue';
|
|
|
export default {
|
|
|
name: 'MaterialList',
|
|
|
@@ -104,28 +80,22 @@
|
|
|
label: '序号'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'loginName',
|
|
|
+ prop: 'name',
|
|
|
label: '物料组名称',
|
|
|
- // sortable: 'custom',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- columnKey: 'roleList',
|
|
|
+ prop: 'code',
|
|
|
label: '物料组编码',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- slot: 'roleList'
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'createTime',
|
|
|
+ prop: 'categoryLevelRootName',
|
|
|
label: '关联分类树',
|
|
|
- // sortable: 'custom',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return this.$util.toDateString(cellValue);
|
|
|
- }
|
|
|
},
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
@@ -148,7 +118,7 @@
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
datasource ({ page, limit, where, order }) {
|
|
|
- return pageUsers({ ...where, ...order, pageNum: page, size: limit });
|
|
|
+ return getGroupPage({ ...where, ...order, pageNum: page, size: limit });
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload (where) {
|
|
|
@@ -163,7 +133,7 @@
|
|
|
/* 删除 */
|
|
|
remove (row) {
|
|
|
const loading = this.$loading({ lock: true });
|
|
|
- deleteUsers([row.id])
|
|
|
+ removeItem([row.id])
|
|
|
.then((msg) => {
|
|
|
loading.close();
|
|
|
this.$message.success(msg);
|