|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
|
<DictDataSearch @search="reload" />
|
|
|
- <div style="margin: 5px 0; padding-left: 262px">
|
|
|
+<!-- <div style="margin: 5px 0; padding-left: 262px">
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@@ -12,27 +12,7 @@
|
|
|
>
|
|
|
添加
|
|
|
</el-button>
|
|
|
- <!-- <el-button
|
|
|
- size="small"
|
|
|
- type="warning"
|
|
|
- icon="el-icon-edit"
|
|
|
- class="ele-btn-icon"
|
|
|
- :disabled="!current"
|
|
|
- @click="openEdit(current)"
|
|
|
- >
|
|
|
- 修改
|
|
|
- </el-button> -->
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="danger"
|
|
|
- icon="el-icon-delete"
|
|
|
- class="ele-btn-icon"
|
|
|
- :disabled="!current"
|
|
|
- @click="remove"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<ele-split-layout
|
|
|
width="244px"
|
|
|
allow-collapse
|
|
|
@@ -57,13 +37,13 @@
|
|
|
</ele-pro-table>
|
|
|
|
|
|
<template v-slot:content>
|
|
|
- <!-- 数据字典项列表 -->
|
|
|
+ <!-- 物料列表 -->
|
|
|
<dict-data ref="dictData" v-if="current" :dict-id="current.id" />
|
|
|
</template>
|
|
|
</ele-split-layout>
|
|
|
</el-card>
|
|
|
- <!-- 编辑弹窗 -->
|
|
|
- <dict-edit :visible.sync="showEdit" @done="reload" />
|
|
|
+<!-- 编辑弹窗
|
|
|
+ <dict-edit :visible.sync="showEdit" @done="reload" /> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -72,7 +52,7 @@
|
|
|
import DictEdit from './components/dict-edit.vue';
|
|
|
import DictDataSearch from './components/dict-data-search.vue';
|
|
|
import { listDictionaries, removeDictionary } from '@/api/system/dictionary';
|
|
|
-
|
|
|
+ import { getSubPage } from '@/api/classifyManage';
|
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
|
components: { DictData, DictEdit, DictDataSearch },
|
|
|
@@ -89,7 +69,7 @@
|
|
|
},
|
|
|
{
|
|
|
prop: 'name',
|
|
|
- label: '字典名称',
|
|
|
+ label: '物料组名称',
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
@@ -105,8 +85,7 @@
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
datasource() {
|
|
|
- // return;
|
|
|
- return listDictionaries();
|
|
|
+ return getSubPage({pageNum:1,size:-1,parentId: 0});
|
|
|
},
|
|
|
/* 表格渲染完成回调 */
|
|
|
done(res) {
|
|
|
@@ -118,40 +97,6 @@
|
|
|
reload(where) {
|
|
|
this.$refs.table.reload();
|
|
|
this.$refs.dictData.reload(where);
|
|
|
- },
|
|
|
- /* 显示编辑 */
|
|
|
- openEdit(row) {
|
|
|
- this.editData = row;
|
|
|
- this.showEdit = true;
|
|
|
- },
|
|
|
- /* 删除 */
|
|
|
- remove() {
|
|
|
- this.$confirm('确定要删除选中的字典吗?', '提示', {
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- if (this.$refs.dictData.selection.length == 0) {
|
|
|
- this.$message({
|
|
|
- message: '当前未选择数据',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- let ids = this.$refs.dictData.selection.map((item) => item.id);
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
-
|
|
|
- removeDictionary(ids, true)
|
|
|
- .then((msg) => {
|
|
|
- loading.close();
|
|
|
- this.$message.success(msg);
|
|
|
- this.reload();
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- loading.close();
|
|
|
- // this.$message.error(e.message);
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
};
|