|
@@ -57,12 +57,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import {
|
|
|
|
|
- pageDictionaryData,
|
|
|
|
|
- removeDictionaryData,
|
|
|
|
|
- removeDictionaryDataBatch
|
|
|
|
|
- } from '@/api/system/dictionary-data';
|
|
|
|
|
- import { listDictionaries, removeDictionary } from '@/api/system/dictionary';
|
|
|
|
|
|
|
+ import { getMaterialList } from '@/api/material/manage.js';
|
|
|
export default {
|
|
export default {
|
|
|
components: { },
|
|
components: { },
|
|
|
data() {
|
|
data() {
|
|
@@ -160,7 +155,7 @@
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where, order }) {
|
|
datasource({ page, limit, where, order }) {
|
|
|
- return listDictionaries({ pageNum: page, size: limit, ...where });
|
|
|
|
|
|
|
+ return getMaterialList({ pageNum: page, size: limit, ...where });
|
|
|
},
|
|
},
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
@@ -193,37 +188,13 @@
|
|
|
loading.close();
|
|
loading.close();
|
|
|
// this.$message.error(e.message);
|
|
// this.$message.error(e.message);
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- /* 批量删除 */
|
|
|
|
|
- removeBatch() {
|
|
|
|
|
- if (!this.selection.length) {
|
|
|
|
|
- this.$message.error('请至少选择一条数据');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.$confirm('确定要删除选中的字典项吗?', '提示', {
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
|
|
- removeDictionaryDataBatch(this.selection.map((d) => d.dictDataId))
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.success(msg);
|
|
|
|
|
- this.reload();
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- // this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {});
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
// 监听字典id变化
|
|
// 监听字典id变化
|
|
|
- // dictId() {
|
|
|
|
|
- // this.reload();
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ currentId() {
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|