|
|
@@ -6,6 +6,7 @@
|
|
|
<ElTableColumn prop="id" label="#" width="80" />
|
|
|
<ElTableColumn prop="name" label="名称" show-overflow-tooltip />
|
|
|
<ElTableColumn prop="remark" label="备注" show-overflow-tooltip />
|
|
|
+ <ElTableColumn prop="userName" label="创建人" align="center" />
|
|
|
<ElTableColumn prop="createdAt" label="创建时间" :formatter="timeFormatter" width="150" />
|
|
|
<ElTableColumn label="操作" align="center" width="200">
|
|
|
<template #default="{ row }">
|
|
|
@@ -76,10 +77,12 @@ const rules = {
|
|
|
name: [{ required: true, message: '请输入名称', trigger: 'blur' }]
|
|
|
}
|
|
|
const { showEditDialog, onEdit } = setupEditDialog(model)
|
|
|
+
|
|
|
async function submit() {
|
|
|
await http.put('/phone-list', model.value)
|
|
|
ElMessage.success('保存成功')
|
|
|
}
|
|
|
+
|
|
|
function del(row) {
|
|
|
ElMessageBox.confirm('确定删除吗?', '提示', {
|
|
|
type: 'warning'
|
|
|
@@ -94,6 +97,7 @@ function del(row) {
|
|
|
const selectedRow = ref(null)
|
|
|
const showDetailDialog = ref(false)
|
|
|
const phoneTable = ref(null)
|
|
|
+
|
|
|
function detail(row) {
|
|
|
selectedRow.value = row
|
|
|
showDetailDialog.value = true
|
|
|
@@ -104,11 +108,13 @@ const phoneRules = {
|
|
|
number: [{ required: true, message: '请输入号码', trigger: 'blur' }]
|
|
|
}
|
|
|
const { showEditDialog: showPhoneEditDialog, onEdit: onPhoneEdit } = setupEditDialog(phoneModel)
|
|
|
+
|
|
|
async function submitPhone() {
|
|
|
phoneModel.value.listId = selectedRow.value.id
|
|
|
await http.put('/phone-list/phone', phoneModel.value)
|
|
|
ElMessage.success('保存成功')
|
|
|
}
|
|
|
+
|
|
|
function delPhone(row) {
|
|
|
ElMessageBox.confirm('确定删除吗?', '提示', {
|
|
|
type: 'warning'
|
|
|
@@ -119,7 +125,9 @@ function delPhone(row) {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
const importing = ref(false)
|
|
|
+
|
|
|
function importList() {
|
|
|
const input = document.createElement('input')
|
|
|
input.type = 'file'
|
|
|
@@ -147,6 +155,7 @@ function importList() {
|
|
|
}
|
|
|
input.click()
|
|
|
}
|
|
|
+
|
|
|
function download(row) {
|
|
|
axiosInstance.get(`/phone-list/${row.id}/download`, { responseType: 'blob' }).then((res) => {
|
|
|
const url = window.URL.createObjectURL(new Blob([res.data]))
|