@@ -34,18 +65,14 @@
编辑
-
- 详情
-
diff --git a/src/api/system/expire.ts b/src/api/system/expire.ts
new file mode 100644
index 0000000..1365711
--- /dev/null
+++ b/src/api/system/expire.ts
@@ -0,0 +1,20 @@
+/**
+ * 系统管理 - 到期提醒
+ */
+import request from '../index'
+// 列表
+export function getList(params: object) {
+ return request({
+ url: '/system/remind/listPage',
+ method: 'get',
+ params,
+ })
+}
+// 编辑
+export function updateRemind(data: object) {
+ return request({
+ url: '/system/remind/update',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/system/label.ts b/src/api/system/label.ts
index 7c040fa..c419845 100644
--- a/src/api/system/label.ts
+++ b/src/api/system/label.ts
@@ -1,25 +1,38 @@
// 流程管理接口
import request from '../index'
-const prefix = '/system/label'
// 列表
-export function getLabelList(data: { offset: number; limit: number }) {
+export function getLabelList(params: object) {
return request({
- url: `${prefix}/listPage?offset=${data.offset}&limit=${data.limit}`,
+ url: '/system/rfid/listPage',
+ method: 'get',
+ params,
+ })
+}
+
+// 删除
+export function delLabel(data: object) {
+ return request({
+ url: '/system/rfid/remove',
method: 'post',
data,
})
}
-// 删除
-export function delLabel(id: string) {
- const param = {
- rfid: id,
- }
+// 导入
+export function importLabel(data: object) {
return request({
- url: `${prefix}/delete`,
+ url: '/system/rfid/export',
method: 'post',
- data: param,
+ data,
})
}
+// 批量导入
+export function batchImportLabel(data: object) {
+ return request({
+ url: '/system/rfid/importRfid',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/icons/icon-delete.svg b/src/assets/icons/icon-delete.svg
new file mode 100644
index 0000000..88e4145
--- /dev/null
+++ b/src/assets/icons/icon-delete.svg
@@ -0,0 +1 @@
+
diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue
new file mode 100644
index 0000000..72d45f9
--- /dev/null
+++ b/src/views/system/expire/edit.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/expire/list.vue b/src/views/system/expire/list.vue
index 1b5a366..9a0497e 100644
--- a/src/views/system/expire/list.vue
+++ b/src/views/system/expire/list.vue
@@ -1,17 +1,48 @@
+
+
@@ -34,18 +65,14 @@
编辑
-
- 详情
-
diff --git a/src/views/system/label/list.vue b/src/views/system/label/list.vue
index d790282..f3e5d8a 100644
--- a/src/views/system/label/list.vue
+++ b/src/views/system/label/list.vue
@@ -9,25 +9,25 @@
const { proxy } = getCurrentInstance() as any
const useStateList = ref
([]) // 关联使用情况字典值
const listQuery = reactive({
- useState: '', // 使用情况
+ rfid: '',
+ equipmentNo: '',
+ equipmentName: '',
+ useStatus: '', // 使用情况
offset: 1,
limit: 20,
})
const fileRef = ref() // 文件上传input,获取input的引用
// 表头
const columns = ref([
- { text: 'RFID标签编号', value: 'rfid', width: '200' },
- { text: '使用情况', value: 'status', width: '100' },
- { text: '绑定设备编号', value: 'equipmentNo', width: '300' },
- { text: '绑定设备名称', value: 'equipmentName', width: '300' },
- { text: '使用岗位', value: 'equipmentDeptName' },
- { text: '负责人', value: 'equipmentDirectorName', width: '150' },
+ { text: 'RFID标签编号', value: 'rfid', width: '200', align: 'center' },
+ { text: '使用情况', value: 'usageStatusName', width: '100', align: 'center' },
+ { text: '绑定设备编号', value: 'equipmentNo', width: '300', align: 'center' },
+ { text: '绑定设备名称', value: 'equipmentName', width: '300', align: 'center' },
+ { text: '使用岗位', value: 'usePosition', align: 'center' },
+ { text: '负责人', value: 'directorName', width: '150', align: 'center' },
])
-const list = ref([
- { rfid: '12341234', status: '未使用' },
- { rfid: '11267643211', status: '已使用', equipmentNo: '312020020007', equipmentName: '压力监测仪', equipmentDeptName: '十二室', equipmentDirectorName: '智慧计量' },
-])
-const total = ref(20)
+const list = ref([])
+const total = ref(0)
const listLoading = ref(false)
// 获取标签使用情况字典值
@@ -36,7 +36,12 @@
useStateList.value = res.data
})
}
-
+// 表格被选中的行
+const selectList = ref([])
+// 表格多选
+const multiSelect = (row: any[]) => {
+ selectList.value = row
+}
// 获取流程列表
const fetchData = async (isNowPage: boolean) => {
listLoading.value = true
@@ -44,23 +49,10 @@
// 是否显示当前页,否则跳转第一页
listQuery.offset = 1
}
- const param = {
- useState: '', // 使用状态
- offset: listQuery.offset,
- limit: listQuery.limit,
- }
- const response = await getLabelList(param)
+ const response = await getLabelList(listQuery)
total.value = parseInt(response.data.total)
- list.value = response.data.rows.map((item: any) => {
- return {
- ...item,
- rfid: item.rfid,
- status: item.useState === 1 ? '已使用' : '未使用',
- equipmentNo: item.equipmentNo,
- equipmentName: item.equipmentName,
- describe: item.formDesc,
- }
- })
+ list.value = response.data.rows
+ console.log(list.value, '546564456')
listLoading.value = false
}
@@ -82,14 +74,15 @@
// 重置
const reset = () => {
- listQuery.useState = '' // 使用情况
+ listQuery.rfid = ''
+ listQuery.equipmentNo = ''
+ listQuery.equipmentName = ''
+ listQuery.useStatus = ''
+ listQuery.limit = 20
+ listQuery.offset = 1
fetchData(true)
}
-// 点击导入
-const upload = () => {
- fileRef.value.click()
-}
const onFileChange = (event: any) => {
// 原生上传
// console.log(event.target.files)
@@ -127,7 +120,7 @@
},
)
.then(() => {
- delLabel(row.rfid).then((res) => {
+ delLabel({ rfids: [row.rfid] }).then((res) => {
if (res.code === 200) {
ElMessage.success('删除成功')
fetchData(true)
@@ -135,9 +128,21 @@
})
})
}
+// 导入
+const ImportFile = () => {
+ fileRef.value.click()
+}
+// 导出
+const exportFile = () => {
+}
+// 批量删除
+const batchDeleteLabel = () => {
+
+}
onMounted(() => {
fetchLabelUseDict()
+ fetchData(true)
})
@@ -147,7 +152,16 @@
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
@@ -173,6 +189,7 @@
:query="listQuery"
:list-loading="listLoading"
@change="changePage"
+ @multiSelect="multiSelect"
>