diff --git a/public/static/editor.html b/public/static/editor.html
index 29333ec..70161bf 100644
--- a/public/static/editor.html
+++ b/public/static/editor.html
@@ -193,26 +193,10 @@
// debugger
// editor.setDocument("text/lake", ' ');
console.log("event", event);
- if (event.data.jobInfoYuQue) {
- editor.setDocument("text/lake", event.data.jobInfoYuQue);
- }else if(event.data.jobInfo){
- let arr = event.data.jobInfo.split("\n");
- console.log(arr);
- // let arr = event.data.trim().split("\n");
- let newArr = [];
- arr.forEach((item, index) => {
- if (index >= 1) {
- let item1 = "
" + item + "
";
- newArr.push(item1);
- }
- });
- var data = newArr.join(" ");
- desp = data.replace(/[*]+/g, "");
- console.log(desp);
- // 然后就可以获得vue传过来的数据
- console.log("从vue中获得的数据", event);
- editor.setDocument("text/lake", desp);
- }
+ var data = event.data;
+ // 然后就可以获得vue传过来的数据
+ console.log("从vue中获得的数据", data);
+ editor.setDocument("text/lake", data);
// var data = event.data.replace(/\n/g, "
");
// desp = data.replace(/[*]+/g, '');
},
diff --git a/src/router/index.js b/src/router/index.js
index 47b7de5..d7d7071 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,4 +1,5 @@
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
+import noticeData from './modules/message.js';
const router = createRouter({
@@ -53,9 +54,9 @@ const router = createRouter({
meta: {
title: '消息通知',
},
- component: () => import("../views/homePage/message.vue")
+ component: () => import("../views/message/index.vue")
}
- ]
+ ].concat(noticeData)
},
{
path: '/login',
diff --git a/src/router/modules/message.js b/src/router/modules/message.js
new file mode 100644
index 0000000..b205fd7
--- /dev/null
+++ b/src/router/modules/message.js
@@ -0,0 +1,21 @@
+let data = [
+ {
+ path: "/merchantManagement/messageAdd",
+ name: "messageAdd",
+ meta: {
+ title: '新增通知',
+ },
+ groupName: '消息通知',
+ component: () => import("../../views/message/add.vue")
+ },
+ {
+ path: "/merchantManagement/messageEdit",
+ name: "messageEdit",
+ meta: {
+ title: '编辑通知',
+ },
+ groupName: '消息通知',
+ component: () => import("../../views/message/add.vue")
+ },
+];
+export default data;
\ No newline at end of file
diff --git a/src/views/components/breadcrumb.vue b/src/views/components/breadcrumb.vue
index 29b7f57..7ddc78c 100644
--- a/src/views/components/breadcrumb.vue
+++ b/src/views/components/breadcrumb.vue
@@ -79,6 +79,12 @@ watch(
} else if (val.name == "recruit") {
secondTitle.value = "配置详情";
firstTitle.value = "小程序配置";
+ } else if (val.name == "messageAdd") {
+ secondTitle.value = "新增通知";
+ firstTitle.value = "消息通知";
+ } else if (val.name == "messageEdit") {
+ secondTitle.value = "编辑通知";
+ firstTitle.value = "消息通知";
}
},
{
@@ -113,6 +119,8 @@ const pushFirstPage = () => {
router.push("/merchantManagement/downstream");
} else if (firstTitle.value == "小程序配置") {
router.push("/merchantManagement/miniProgramList");
+ } else if (firstTitle.value == "消息通知") {
+ router.push("/merchantManagement/message");
}
};
diff --git a/src/views/homePage/projectData.vue b/src/views/homePage/projectData.vue
index f39feab..0ba14a9 100644
--- a/src/views/homePage/projectData.vue
+++ b/src/views/homePage/projectData.vue
@@ -57,7 +57,7 @@
+
diff --git a/src/views/message/add.vue b/src/views/message/add.vue
new file mode 100644
index 0000000..c8a80e4
--- /dev/null
+++ b/src/views/message/add.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
diff --git a/src/views/homePage/message.vue b/src/views/message/index.vue
similarity index 77%
rename from src/views/homePage/message.vue
rename to src/views/message/index.vue
index 232d9a5..6052539 100644
--- a/src/views/homePage/message.vue
+++ b/src/views/message/index.vue
@@ -8,8 +8,8 @@
-
-
新增内容
+
+
新增内容
-
编辑
+
编辑
删除
@@ -74,9 +74,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 关闭
- 确定
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关闭
+ 确定
+
@@ -155,7 +144,7 @@ import { ref, onMounted, getCurrentInstance, h, watch } from "vue";
import { PlusOutlined, EllipsisOutlined, UploadOutlined, DownOutlined } from "@ant-design/icons-vue";
import { Modal, message } from "ant-design-vue";
import { useRouter, useRoute } from "vue-router";
-import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi,updateUserApi } from "../../api/userList/userList";
+import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi, updateUserApi } from "../../api/userList/userList";
import { DownloadOutlined } from "@ant-design/icons-vue";
import idCardPanel from "../components/upload/image.vue";
@@ -183,69 +172,64 @@ const handleChangeSearch = (e) => {
}
};
const modalInfo = ref({
- title:'新增用户',
- id:0,
- form:{
- name:"",
- username:'',
- idcard:'',
- description:''
- }
-})
-
+ title: "新增用户",
+ id: 0,
+ form: {
+ name: "",
+ username: "",
+ idcard: "",
+ description: "",
+ },
+});
-const submitForm = ()=>{
- let url = '',params = {};
+const submitForm = () => {
+ let url = "",
+ params = {};
params = {
- name:modalInfo.value.form.name,
- username:modalInfo.value.form.username,
- idcard:modalInfo.value.form.idcard,
- description:modalInfo.value.form.description,
- password:'123456',
- id:modalInfo.value.id
- }
-
-
- if (!commonJS.regular(modalInfo.value.form.username, 'tel')) {
- message.warning('请输入正确的手机号')
- return false
- }
-
+ name: modalInfo.value.form.name,
+ username: modalInfo.value.form.username,
+ idcard: modalInfo.value.form.idcard,
+ description: modalInfo.value.form.description,
+ password: "123456",
+ id: modalInfo.value.id,
+ };
- if(modalInfo.value.id){
- delete params.password;
- updateUserApi(params).then((res)=>{
- showAdd.value = false;
- message.success("修改成功");
- getTable();
- });
- }else{
- addUserApi(params).then((res)=>{
- showAdd.value = false;
- message.success("新增成功");
- getTable();
- });
+ if (!commonJS.regular(modalInfo.value.form.username, "tel")) {
+ message.warning("请输入正确的手机号");
+ return false;
+ }
- }
-
-
-}
+ if (modalInfo.value.id) {
+ delete params.password;
+ updateUserApi(params).then((res) => {
+ showAdd.value = false;
+ message.success("修改成功");
+ getTable();
+ });
+ } else {
+ addUserApi(params).then((res) => {
+ showAdd.value = false;
+ message.success("新增成功");
+ getTable();
+ });
+ }
+};
const handleToForm = ($type, $data) => {
- showAdd.value = true;
- console.log($data.id);
- modalInfo.value = {
- isShow:true,
- title:'修改用户',
- form:{
- name:$data.name,
- username:$data.username,
- idcard:$data.idcard,
- description:$data.description,
- },
- id:$data.id
- }
+ showAdd.value = true;
+ console.log($data.id);
+ modalInfo.value = {
+ isShow: true,
+ title: "修改用户",
+ form: {
+ name: $data.name,
+ username: $data.username,
+ idcard: $data.idcard,
+ description: $data.description,
+ },
+ id: $data.id,
+ };
- // updateUserApi({
+ // updateUserApi({
// description: "测试备注",
// idcard: "123123123123123123",
// name: "测试真名",
@@ -277,8 +261,6 @@ const handleToForm = ($type, $data) => {
// }
};
-
-
/* #################### 表格事件 #################### */
const tableData = ref({
keyword: "",
@@ -299,26 +281,31 @@ const getTable = () => {
tableData.value = { ...res.data, keyword: tableData.value.keyword, page: res.data.current, limit: res.data.size };
tableData.value.records.forEach((item, index) => {
item.rank = index + 1;
- item.title = '常用发票主体信息';
+ item.title = "常用发票主体信息";
item.content = "默认主体:郑州伯才科技有限公司 单位名称:郑州伯才科技有限公司 纳税人识别号:91410100MA9L4HDT0L 地址:河南自贸试验区郑州";
item.time = "2024-03-11 13:04:24";
});
});
};
-const openAdd = () =>{
- showAdd.value = true
- modalInfo.value.title = "新增用户"
- modalInfo.value.id = 0;
- modalInfo.value = {
- form:{
- name:"",
- username:'',
- idcard:'',
- description:''
- }
- }
+const openAdd = (_type,_record) => {
+if(_type == 'add'){
+ router.push({
+ path: "messageAdd",
+ // query: {
+ // type: "add",
+ // },
+ });
+} else {
+ router.push({
+ path: "messageEdit",
+ query: {
+ id: _record.rank,
+ },
+ });
}
+
+};
const columns = ref([
{
title: "序号",
@@ -347,7 +334,7 @@ const columns = ref([
width: "200px",
ellipsis: true,
},
-
+
{
title: "操作",
key: "state",
@@ -408,7 +395,6 @@ const handleApplication = (record) => {
});
};
-
const handleDel = ($data) => {
commonJS.gConfirmModal(
"删除",
@@ -440,9 +426,8 @@ const handleModalSize = ($page, $size) => {