diff --git a/src/api/model/system.ts b/src/api/model/system.ts
index 09c91a9..34d45ca 100644
--- a/src/api/model/system.ts
+++ b/src/api/model/system.ts
@@ -235,4 +235,33 @@ export default {
return await http.get("translations", data);
}
},
+ message: {
+ list: async function (data = {}) {
+ return await http.get("message/list", data);
+ },
+ add: async function (data = {}) {
+ return await http.post("message/add", data);
+ },
+ edit: async function (data = {}) {
+ return await http.put("message/edit", data);
+ },
+ del: async function (data = {}) {
+ return await http.delete("message/del", data);
+ },
+ recalled: async function (data = {}) {
+ return await http.put("message/recalled", data);
+ },
+ mine: async function (data = {}) {
+ return await http.get("message/mine", data);
+ },
+ read: async function (data = {}) {
+ return await http.post("message/read", data);
+ },
+ detail: async function (data = {}) {
+ return await http.get("message/detail", data);
+ },
+ remove: async function (data = {}) {
+ return await http.delete("message/remove", data);
+ },
+ },
}
diff --git a/src/assets/images/404.png b/src/assets/images/404.png
new file mode 100644
index 0000000..d406f04
Binary files /dev/null and b/src/assets/images/404.png differ
diff --git a/src/components/piEditor/index.vue b/src/components/piEditor/index.vue
index 3cc2018..dcbc5c5 100644
--- a/src/components/piEditor/index.vue
+++ b/src/components/piEditor/index.vue
@@ -66,10 +66,10 @@ let html = ref("")
watch(() => props.modelValue, () => {
html.value = props.modelValue
-}, {deep: true})
-
-onMounted(() => {
+}, {immediate: true})
+watch(html, () => {
+ emit("update:modelValue", html.value)
})
onUnmounted(() => {
diff --git a/src/layout/components/tasks.vue b/src/layout/components/attach.vue
similarity index 100%
rename from src/layout/components/tasks.vue
rename to src/layout/components/attach.vue
diff --git a/src/layout/components/msg.vue b/src/layout/components/msg.vue
new file mode 100644
index 0000000..97dec54
--- /dev/null
+++ b/src/layout/components/msg.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+ 全部已读
+
+
+
+
+
+
diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue
index 35c93ed..e3bade1 100644
--- a/src/layout/components/userbar.vue
+++ b/src/layout/components/userbar.vue
@@ -14,18 +14,11 @@
-
-
-
+
+
-
+
@@ -33,34 +26,17 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
- 查看更多
-
+
+
{{ nicknameF }}
@@ -90,8 +66,8 @@
-
-
+
+
@@ -100,9 +76,10 @@ defineOptions({
name: "userBar"
})
import {ref, onMounted, getCurrentInstance} from "vue"
-import search from './search.vue'
-import setting from './setting.vue'
-import tasks from './tasks.vue'
+import search from './search'
+import setting from './setting'
+import attach from './attach'
+import msg from './msg'
import websocket from "@/utils/websocket"
import {ElNotification} from 'element-plus'
import tools from "@/utils/tools"
@@ -116,14 +93,11 @@ const {t} = useI18n()
const msgVisible = ref(false);
let searchVisible = ref(false)
-let msg = ref(false)
-let msgNum = ref(2)
-let msgList = ref([])
-const tasksVisible = ref(false)
-let taskNum = ref(0)
+let newMsg = ref(false)
+const attachVisible = ref(false)
+let newTask = ref(false)
const settingDialog = ref(false)
const userInfo = tools.data.get("USER_INFO");
-let msgTab = ref("notice")
let nickname = userInfo.nickname || userInfo.username;
let nicknameF = nickname.substring(0, 1);
@@ -132,7 +106,6 @@ let avatar = userInfo.avatar
// mounted
onMounted(() => {
initWebSocket()
- loadData()
})
function initWebSocket() {
@@ -142,16 +115,16 @@ function initWebSocket() {
}
function messageHandle(message) {
- if (message.data == "connection successful" || message.data == "pong") {
+ if (message.data === "connection successful" || message.data === "pong") {
return;
}
const data = JSON.parse(message.data)
if (!data) {
return;
}
- if (data.code == 200) {
+ if (data.code === 200) {
ElNotification.success({
- title: 'Success',
+ title: '新信息通知',
message: data['msg']
})
} else {
@@ -160,12 +133,11 @@ function messageHandle(message) {
message: data['msg']
})
}
- if (data.type == "message") {
- msgNum.value++
- } else if (data.type == "task") {
- taskNum.value++
+ if (data.type === "system" || data.type === "business" || data.type === "approval") {
+ newMsg.value = true
+ } else if (data.type === "attach") {
+ newTask.value = true
}
- return;
}
function closeHandle() {
@@ -218,48 +190,6 @@ function handleUser(command) {
function screen() {
tools.screen(document.documentElement)
}
-
-async function loadData() {
- // let res = await this.$API.home.message.newCount()
- // this.msgNum = res.data.count
- msgNum.value = 5
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。您有一笔新的订单请及时处理',
- time: '2025-06-17 17:59:21'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。您有一笔新的订单请及时处理',
- time: '2025-06-16 10:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2025-06-15 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2025-05-15 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2025-01-16 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2024-06-15 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2024-06-15 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2015-06-15 12:29:30'
- })
- msgList.value.push({
- title: '您有一笔新的订单请及时处理。',
- time: '2025-06-15 12:29:30'
- })
-}
diff --git a/src/views/dashboard/message/index.vue b/src/views/dashboard/message/index.vue
deleted file mode 100644
index a735510..0000000
--- a/src/views/dashboard/message/index.vue
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/system/account/index.vue b/src/views/system/account/index.vue
index 2c5241e..3fa4a2f 100644
--- a/src/views/system/account/index.vue
+++ b/src/views/system/account/index.vue
@@ -6,11 +6,15 @@
-
+
-
+
@@ -27,17 +31,22 @@
+
+
- {{scope.row.roles.map(item=>item.role_name).toString()}}
+ {{ scope.row.roles.map(item => item.role_name).toString() }}
- 查看
- 编辑
+ 查看
+
+ 编辑
+
删除
@@ -90,60 +99,68 @@ onMounted(() => {
})
//添加
-function add(){
+function add() {
dialogShow.value = true
nextTick(() => {
saveRef.value.open('add', null, group.value)
})
}
+
//编辑
-function table_edit(row){
+function table_edit(row) {
dialogShow.value = true
nextTick(() => {
saveRef.value.open('edit', row, group.value)
})
}
+
//查看
-function table_show(row){
+function table_show(row) {
dialogShow.value = true
nextTick(() => {
saveRef.value.open('show', row, group.value)
})
}
+
//删除
-async function table_del(row){
+async function table_del(row) {
const loading = proxy.$loading();
var res = await api.system.account.del({ids: [row.account_id]});
tableRef.value.refresh()
loading.close();
proxy.$message.success(res.msg)
}
+
//表格选择后回调事件
-function selectionChange(e){
+function selectionChange(e) {
selection.value = e;
}
+
//加载树数据
-async function getGroup(){
+async function getGroup() {
showGrouploading.value = true;
const res = await api.system.dept.option();
showGrouploading.value = false;
group.value = tools.makeTreeData(res.data, 0, "dept_id");
group.value.unshift({'dept_id': null, 'dept_name': '所有部门'})
}
+
//树过滤
-function groupFilterNode(value, data){
+function groupFilterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
}
+
//树点击事件
-function groupClick(data){
+function groupClick(data) {
var params = {
dept_id: data.dept_id
}
tableRef.value.reload(params)
}
+
//搜索
-function upsearch(){
+function upsearch() {
tableRef.value.upData(search.value)
}
diff --git a/src/views/system/account/save.vue b/src/views/system/account/save.vue
index 2becbcc..eb5123f 100644
--- a/src/views/system/account/save.vue
+++ b/src/views/system/account/save.vue
@@ -1,28 +1,38 @@
-
+
+
+
+
+
+
+
-
+
-
+
-
+
- 取 消
+ 取 消
保 存
@@ -49,8 +59,10 @@ let titleMap = ref({
let visible = ref(false)
let isSaveing = ref(false)
const form = ref({
- account_id:null,
+ account_id: null,
username: "",
+ email: '',
+ phone: '',
password: "",
dept_id: 0,
roles: [],
@@ -84,7 +96,7 @@ onMounted(() => {
getGroup2()
})
-function open(m='add', data = {}, d = []){
+function open(m = 'add', data = {}, d = []) {
mode.value = m;
if (data) {
Object.assign(form.value, data)
@@ -96,21 +108,24 @@ function open(m='add', data = {}, d = []){
}
//加载树数据
-async function getGroup(){
+async function getGroup() {
const res = await api.system.role.option();
groups.value = res.data;
}
-async function getGroup2(){
+async function getGroup2() {
const res = await api.system.post.option();
groups2.value = res.data;
}
//表单提交方法
-async function submit(){
+async function submit() {
// 校验登录
- const validate = await formRef.value.validate().catch(() => {});
- if(!validate){ return false }
+ const validate = await formRef.value.validate().catch(() => {
+ });
+ if (!validate) {
+ return false
+ }
// 部门获取最后一项
form.value.dept_id = deptRef.value.getCheckedNodes()[0].data.dept_id
if (form.value.password) form.value.password = tools.crypto.MD5(form.value.password)
diff --git a/src/views/system/message/index.vue b/src/views/system/message/index.vue
new file mode 100644
index 0000000..2f39e0f
--- /dev/null
+++ b/src/views/system/message/index.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+ 查看
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+ 撤回
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/message/save.vue b/src/views/system/message/save.vue
new file mode 100644
index 0000000..e1b6dc7
--- /dev/null
+++ b/src/views/system/message/save.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
+
+
+
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index a238aee..b739756 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -10,6 +10,20 @@
{{ userInfo.bio }}
+
+
+
+
+
+ {{ userInfo.email || "保密" }}
+
+
+
+
+
+
+ {{ userInfo.phone || "保密" }}
+
@@ -68,6 +82,12 @@
+
+
+
+
+
+