From 118891d244f6449b99f6abe48ee00018a3315a8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9A=B4=E7=82=B3=E6=9E=97?= <15237758276@163.com>
Date: Tue, 8 Oct 2024 10:17:34 +0800
Subject: [PATCH] no message
---
src/api/workPoint.js | 27 ++++
src/components/Crud/CRUD.operation.vue | 29 ++++-
src/views/base-data/stock/index.vue | 18 +--
src/views/base-data/workPoint/index.vue | 162 ++++++++++++++++++++++++
4 files changed, 219 insertions(+), 17 deletions(-)
create mode 100644 src/api/workPoint.js
create mode 100644 src/views/base-data/workPoint/index.vue
diff --git a/src/api/workPoint.js b/src/api/workPoint.js
new file mode 100644
index 0000000..24c31f7
--- /dev/null
+++ b/src/api/workPoint.js
@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+export function add(data) {
+ return request({
+ url: 'api/workPoint',
+ method: 'post',
+ data
+ })
+}
+
+export function del(ids) {
+ return request({
+ url: 'api/workPoint/',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/workPoint',
+ method: 'put',
+ data
+ })
+}
+
+export default { add, edit, del }
diff --git a/src/components/Crud/CRUD.operation.vue b/src/components/Crud/CRUD.operation.vue
index 5ec726a..e56d4b2 100644
--- a/src/components/Crud/CRUD.operation.vue
+++ b/src/components/Crud/CRUD.operation.vue
@@ -124,6 +124,9 @@
import CRUD, {crud} from '@crud/crud'
import crudTableConfig from '@/api/tableConfig'
import Sortable from 'sortablejs'
+import {mapGetters} from "vuex";
+import { getToken } from '@/utils/auth'
+
function sortWithRef(src, ref) {
const result = Object.assign([], ref)
@@ -162,8 +165,14 @@ export default {
}
}
},
+ computed: {
+ ...mapGetters([
+ 'baseApi'
+ ])
+ },
data() {
return {
+ headers: { 'Authorization': getToken() },
hiddenColumns: [],
table_configs: [],
table_configs_xs: [],
@@ -197,11 +206,25 @@ export default {
// 方法区
this.initcolumn();
}, 200)
-
-
},
methods: {
-
+ handleSuccess(response, file, fileList) {
+ this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ this.$refs.upload.clearFiles()
+ this.crud.status.add = CRUD.STATUS.NORMAL
+ this.crud.resetForm()
+ this.crud.toQuery()
+ },
+ // 监听上传失败
+ handleError(e, file, fileList) {
+ const msg = JSON.parse(e.message)
+ this.$notify({
+ title: msg.message,
+ type: 'error',
+ duration: 2500
+ })
+ this.loading = false
+ },
initcolumn() {
this.updateTableColumns()
const strHidden = sessionStorage.getItem(this.tableKey)
diff --git a/src/views/base-data/stock/index.vue b/src/views/base-data/stock/index.vue
index 872a212..2c7fd3f 100644
--- a/src/views/base-data/stock/index.vue
+++ b/src/views/base-data/stock/index.vue
@@ -65,18 +65,6 @@
>
状态调整
-
- 导入
-
@@ -201,7 +189,8 @@ export default {
edit: false,
del: false,
reset: true,
- download: true
+ download: true,
+ import: true
},
queryOnPresenterCreated: true
})
@@ -216,7 +205,8 @@ export default {
permission: {
add: ['admin', 'stock:add'],
edit: ['admin', 'stock:edit'],
- del: ['admin', 'stock:del']
+ del: ['admin', 'stock:del'],
+ import: ['admin', 'stock:import']
},
stockTypes: [],
rules: {
diff --git a/src/views/base-data/workPoint/index.vue b/src/views/base-data/workPoint/index.vue
new file mode 100644
index 0000000..9b09250
--- /dev/null
+++ b/src/views/base-data/workPoint/index.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 未设置字典,请手动设置 Select
+
+
+
+
+
+ 未设置字典,请手动设置 Select
+
+
+
+
+
+ 未设置字典,请手动设置 Select
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+