diff --git a/src/api/Sys.ts b/src/api/Sys.ts index be599ef..29a6aba 100644 --- a/src/api/Sys.ts +++ b/src/api/Sys.ts @@ -306,3 +306,14 @@ export function saveUser(data) { }); } +/** + *消息管理-获取 + */ + export function noticePage(params) { + return request({ + url: `/admin/notice/noticePage`, + method: "GET", + params:params + }); +} + diff --git a/src/components/CustomUpload/index.vue b/src/components/CustomUpload/index.vue index 96ac924..2fb18fa 100644 --- a/src/components/CustomUpload/index.vue +++ b/src/components/CustomUpload/index.vue @@ -82,7 +82,7 @@
-
+
@@ -186,6 +186,8 @@ const beforeUpload = (file) => { return isTypeOk; }; +const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL); + /** * 上传文件 */ @@ -204,7 +206,7 @@ const handleUpload = (res) => { clearInterval(timmer.value); timmer.value = null; if (res.data) { - res.data.url = res.data.filepath; + res.data.url = baseUrl.value + res.data.filepath; res.data.fileType = getFileType(res.data.url); fileList.value.push(res.data); emits("onUpdate", fileList.value); @@ -296,12 +298,12 @@ const setFiles = () => { }); }; -watch( - () => props.listPic, - () => { - setFiles(); - } -); +// watch( +// () => props.listPic, +// () => { +// setFiles(); +// } +// ); onMounted(() => { setFiles(); @@ -310,88 +312,88 @@ onMounted(() => { diff --git a/src/components/QuillEditor/index.vue b/src/components/QuillEditor/index.vue index 3bfdb0b..f83b118 100644 --- a/src/components/QuillEditor/index.vue +++ b/src/components/QuillEditor/index.vue @@ -17,14 +17,16 @@ import { QuillEditor } from '@vueup/vue-quill' import '@vueup/vue-quill/dist/vue-quill.snow.css' import { reactive, onMounted, ref, toRaw, watch } from 'vue' // import { backsite } from '@/api' +import { uploadFile } from '@/api/file' -const props = defineProps(['value']) +const props = defineProps(['value','id','userId','FileType']) const emit = defineEmits(['updateValue']) const content = ref('') const myQuillEditor = ref() watch(() => props.value, (val) => { - console.log(toRaw(myQuillEditor.value)) - toRaw(myQuillEditor.value).setHTML(val) + // console.log(toRaw(myQuillEditor.value)) + // toRaw(myQuillEditor.value).setHTML(val) + content.value = val }, { deep: true }) const fileBtn = ref() const data = reactive({ @@ -55,8 +57,10 @@ const imgHandler = (state) => { } const setValue = () => { const text = toRaw(myQuillEditor.value).getHTML() + // console.log(text,'text===>'); emit('updateValue', text) } +const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL); const handleUpload = (e) => { const files = Array.prototype.slice.call(e.target.files) if (!files) { @@ -64,8 +68,20 @@ const handleUpload = (e) => { } const formdata = new FormData() formdata.append('file', files[0]) - // backsite.uploadFile(formdata) + uploadFile(props.userId,props.id,props.FileType,formdata) + .then(res => { + if (res.data.filepath) { + const quill = toRaw(myQuillEditor.value).getQuill() + const length = quill.getSelection().index + // 插入图片,res为服务器返回的图片链接地址 + quill.insertEmbed(length, 'image', baseImgUrl.value + res.data.filepath) + // 调整光标到最后 + quill.setSelection(length + 1) + } + }) + // uploadFile(formdata) // .then(res => { + // console.log(res,'formdatares====>'); // if (res.data.url) { // const quill = toRaw(myQuillEditor.value).getQuill() // const length = quill.getSelection().index @@ -86,11 +102,11 @@ onMounted(() => { diff --git a/src/components/index.ts b/src/components/index.ts index 1432340..4006adf 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -3,6 +3,7 @@ import TitleC from "./TitleC/index.vue"; import BaseDialog from './BaseDialog/index.vue' import CustomUpload from "./CustomUpload/index.vue"; import QuillEditor from "./QuillEditor/index.vue"; +import ImageUpload from "./ImageUpload/index.vue"; // import TEditor from "./Editor/index.vue" -export default [TitleC,BaseDialog,CustomUpload,QuillEditor] +export default [TitleC,BaseDialog,CustomUpload,QuillEditor,ImageUpload] diff --git a/src/router/modules/big-data.js b/src/router/modules/big-data.js new file mode 100644 index 0000000..64e5bb1 --- /dev/null +++ b/src/router/modules/big-data.js @@ -0,0 +1,10 @@ +const Layout = () => import('@/layout/index.vue') + +export default { + path: 'http://42.193.40.239:8050/', + component: Layout, + meta: { + title: '大数据分析', + icon: 'point', + }, +} \ No newline at end of file diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 7193f53..f156a5a 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -38,18 +38,6 @@ export default { title: '职务管理', breadcrumb: true, }, - children: [ - { - path: 'postdetail', - name: 'post-detail', - component: () => import('@/views/system/post-management/detail-post.vue'), - meta: { - title: '职务详情', - sidebar: false, - breadcrumb: true, - } - }, - ] }, { path: 'role', @@ -155,6 +143,16 @@ export default { } }, ] - } + }, + { + path: 'messageindex', + name: 'messageindex', + meta: { + icon: 'point', + title: '消息管理', + breadcrumb: true, + }, + component: () => import('@/views/system/message/index.vue'), + }, ] } \ No newline at end of file diff --git a/src/router/routes.js b/src/router/routes.js index b10a30f..3217019 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -108,6 +108,7 @@ import base from './modules/basemanage'; import trends from './modules/work-trends'; import manage from './modules/work-manage'; import statistic from './modules/statistic'; +import bigData from './modules/big-data'; // 动态路由(异步路由、导航栏路由) let asyncRoutes = [ @@ -125,6 +126,7 @@ let asyncRoutes = [ manage, statistic, system, + bigData, ] } ] diff --git a/src/utils/common.ts b/src/utils/common.ts index 5b140f6..3c42206 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -28,6 +28,8 @@ export enum FileType { //道孚 workManagement = 'workManagement',//工作管理 workDynamics = 'workDynamics',//工作管理 + message = 'message',//消息管理富文本 + messageCover = 'messageCover',//消息管理封面 } // 文件接口类型 export enum ApiFile { diff --git a/src/views/emergency/equip/index.vue b/src/views/emergency/equip/index.vue index 7ccb47a..cfe8909 100644 --- a/src/views/emergency/equip/index.vue +++ b/src/views/emergency/equip/index.vue @@ -1,7 +1,7 @@ @@ -258,7 +258,7 @@ const handleClose = () => { :loading="loading" type="primary" size="large" - style="width: 100%" + style="width: 100%;" @click.prevent="handleLogin" >登录 @@ -308,7 +308,7 @@ const handleClose = () => { :src="img" alt="" @click="getCode" - style="width: 100%; height: 100%" + style="width: 100%; height: 100%;" /> @@ -342,7 +342,7 @@ const handleClose = () => { :loading="loading" type="primary" size="large" - style="width: 100%; margin-top: 20px" + style="width: 100%; margin-top: 20px;" @click.prevent="handleReset" >确认 @@ -364,224 +364,224 @@ const handleClose = () => { diff --git a/src/views/resumption/post_config/Safedutydetails.vue b/src/views/resumption/post_config/Safedutydetails.vue index f14857c..a1bed26 100644 --- a/src/views/resumption/post_config/Safedutydetails.vue +++ b/src/views/resumption/post_config/Safedutydetails.vue @@ -76,11 +76,11 @@ import useUserStore from "@/store/modules/user"; import { ElMessage, FormInstance, FormRules } from "element-plus"; import { getYears } from "@/utils/common"; -import { - getFactorCheckstandard, - addSafeduty, - updateSafeduty, -} from "@/api/performDuties"; +// import { +// getFactorCheckstandard, +// addSafeduty, +// updateSafeduty, +// } from "@/api/performDuties"; const formRef = ref(); const userStore = useUserStore(); diff --git a/src/views/resumption/post_config/details.vue b/src/views/resumption/post_config/details.vue index 405da44..3582156 100644 --- a/src/views/resumption/post_config/details.vue +++ b/src/views/resumption/post_config/details.vue @@ -133,11 +133,11 @@ import useUserStore from "@/store/modules/user"; import { ElMessage, FormInstance, FormRules } from "element-plus"; import { getYears } from "@/utils/common"; -import { - getFactorCheckstandard, - addFactor, - updateFactor, -} from "@/api/performDuties"; +// import { +// getFactorCheckstandard, +// addFactor, +// updateFactor, +// } from "@/api/performDuties"; const formRef = ref(); const userStore = useUserStore(); diff --git a/src/views/resumption/post_config/index.vue b/src/views/resumption/post_config/index.vue index 4eb43b9..6e3bf3c 100644 --- a/src/views/resumption/post_config/index.vue +++ b/src/views/resumption/post_config/index.vue @@ -32,9 +32,9 @@ />
-
+
-
+
{{ scope.row.isfinish }} @@ -191,7 +191,7 @@
-
+
import { onMounted, reactive, ref } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; -import { - listPerformDetail, - getFactorType, - factorPage, - delFactor, - getSafedutyList, - delSafeduty, -} from "@/api/performDuties"; +// import { +// listPerformDetail, +// getFactorType, +// factorPage, +// delFactor, +// getSafedutyList, +// delSafeduty, +// } from "@/api/performDuties"; import Adddetails from "./details.vue"; import AddSafedutydetails from "./Safedutydetails.vue"; import { getYears } from "@/utils/common"; @@ -442,24 +442,24 @@ onMounted(() => { \ No newline at end of file diff --git a/src/views/resumption/work-index/addTask.vue b/src/views/resumption/work-index/addTask.vue index f56cd89..d505465 100644 --- a/src/views/resumption/work-index/addTask.vue +++ b/src/views/resumption/work-index/addTask.vue @@ -22,13 +22,13 @@ value-format="YYYY-MM-DD" :size="size" />
- + - + @@ -41,7 +41,7 @@ import { reactive, ref, onMounted, watch } from "vue"; import useUserStore from "@/store/modules/user"; import type { FormInstance, FormRules } from 'element-plus' import { ElMessage } from 'element-plus' -import { getSpecialTasksTypeList, getSpecialTasksPerformList, addSpecialTasks } from "@/api/performDuties"; +// import { getSpecialTasksTypeList, getSpecialTasksPerformList, addSpecialTasks } from "@/api/performDuties"; import { getUUID, FileType } from "@/utils/common"; const baseUrl = ref(import.meta.env.VITE_UPLOAD_IMG_URL); const userStore = useUserStore(); @@ -140,14 +140,12 @@ watch( .detailForm-content { margin-right: 30px; } - :deep(.el-form) { display: flex; flex-wrap: wrap; // justify-content: space-around; justify-content: space-between; } - :deep(.el-form-item) { width: 47%; } diff --git a/src/views/resumption/work-index/index.vue b/src/views/resumption/work-index/index.vue index 76ec7ad..978269e 100644 --- a/src/views/resumption/work-index/index.vue +++ b/src/views/resumption/work-index/index.vue @@ -50,7 +50,7 @@
-
+
新增履职记录
@@ -61,18 +61,18 @@ 序列 - 内容 + 内容 完成进度 - - + +
- + {{ index + 1 }} @@ -82,15 +82,15 @@
- +
- @@ -123,7 +123,7 @@
-
+
@@ -133,11 +133,10 @@
+ overflow-y: scroll; + height: 90%; + margin: 0 -16px 16px 0; +">
[{{ item.type == 1 ? "检查" : item.type == 2 ? "任务" : item.type == 3 ? "政策" : item.type @@ -167,7 +166,7 @@
-
+
@@ -176,7 +175,7 @@ 查看更多
-
+
【{{ item.typeTitle }}】 @@ -193,7 +192,7 @@ 已超时
-
+
{{ item.content }} @@ -215,11 +214,11 @@
+ padding-top: 0; + padding-bottom: 0; + overflow-y: scroll; + height: 82%; +">
@@ -231,7 +230,7 @@
{{ item.createTime }} - + 已学习 {{ item.viewingtimes || 0 }}次 @@ -244,7 +243,7 @@
- + @@ -255,13 +254,13 @@ import { getCurrentInstance, onMounted, ref } from "vue"; import { useRouter } from "vue-router"; import { getUUID } from "@/utils/common"; -import { - factorList, performRecord, factorProgress, getDataCount, getSpecialTasksUserList, - getSpecialTasksPage, getGovNoticePage, getGovNoticeUserPage, getUserStudyPage, getUserStudy -} from "@/api/performDuties"; +// import { +// factorList, performRecord, factorProgress, getDataCount, getSpecialTasksUserList, +// getSpecialTasksPage, getGovNoticePage, getGovNoticeUserPage, getUserStudyPage, getUserStudy +// } from "@/api/performDuties"; import xinprogress from "@/views/components/Progress.vue"; -import AdddDuty from "@/views/resumption/record/details.vue"; +// import AdddDuty from "@/views/resumption/record/details.vue"; import AddMsg from "./details.vue"; import MsgDetails from "./msgDetails.vue"; import StuDetails from "./stuDetails.vue"; @@ -636,546 +635,467 @@ onMounted(() => { \ No newline at end of file diff --git a/src/views/resumption/work-index/more-message/index.vue b/src/views/resumption/work-index/more-message/index.vue index 0d80e72..ae0467a 100644 --- a/src/views/resumption/work-index/more-message/index.vue +++ b/src/views/resumption/work-index/more-message/index.vue @@ -15,7 +15,7 @@
-
+
@@ -74,7 +74,7 @@ \ No newline at end of file diff --git a/src/views/resumption/work-index/msgDetails.vue b/src/views/resumption/work-index/msgDetails.vue index 33ca520..4bd16aa 100644 --- a/src/views/resumption/work-index/msgDetails.vue +++ b/src/views/resumption/work-index/msgDetails.vue @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/src/views/statistic/components/gz.vue b/src/views/statistic/components/gz.vue index 6e03952..7fde5e7 100644 --- a/src/views/statistic/components/gz.vue +++ b/src/views/statistic/components/gz.vue @@ -8,10 +8,6 @@ 刷新
-
- - 导出 -
@@ -126,6 +122,6 @@ const tableData = ref([{ cName: "xxx村名" }, { cName: "xxx村名" }]); diff --git a/src/views/system/base/govuser/details.vue b/src/views/system/base/govuser/details.vue index 4ef4086..1e98b4a 100644 --- a/src/views/system/base/govuser/details.vue +++ b/src/views/system/base/govuser/details.vue @@ -112,7 +112,7 @@ const userId = ref(user.value.userId); const uuid = ref(""); const ruleForm = reactive({ sysusername: [{ required: true, message: "请输入账号", trigger: "blur" }], - syspassword: [{ required: true,pattern: "^(?=.*[a-zA-Z])(?=.*\\d).{10,}$", message: "请输入10位密码包括英文与数字", trigger: "blur" }], + syspassword: [{ required: true,pattern: "^(?=.*[a-zA-Z])(?=.*\\d).{10,}$", message: "请输入10位密码包括大小写英文字母与数字", trigger: "blur" }], chinaname: [{ required: true, message: "请输入中文名", trigger: "blur" }], userroles: [{ required: true, message: "请选择角色", trigger: "change" }], sysunitorentid: [ diff --git a/src/views/system/base/post-management/add-or-edit-duty.vue b/src/views/system/base/post-management/add-or-edit-duty.vue index 0bfd62e..671971d 100644 --- a/src/views/system/base/post-management/add-or-edit-duty.vue +++ b/src/views/system/base/post-management/add-or-edit-duty.vue @@ -94,11 +94,11 @@ import useUserStore from "@/store/modules/user"; import { ElMessage, FormInstance, FormRules } from "element-plus"; import { getYears } from "@/utils/common"; -import { - getFactorCheckstandard, - addFactor, - updateFactor, -} from "@/api/performDuties"; +// import { +// getFactorCheckstandard, +// addFactor, +// updateFactor, +// } from "@/api/performDuties"; const formRef = ref(); const userStore = useUserStore(); diff --git a/src/views/system/base/post-management/add-or-edit-safe.vue b/src/views/system/base/post-management/add-or-edit-safe.vue index b837c1d..6f94339 100644 --- a/src/views/system/base/post-management/add-or-edit-safe.vue +++ b/src/views/system/base/post-management/add-or-edit-safe.vue @@ -48,11 +48,11 @@ import useUserStore from "@/store/modules/user"; import { ElMessage, FormInstance, FormRules } from "element-plus"; import { getYears } from "@/utils/common"; -import { - getFactorCheckstandard, - addSafeduty, - updateSafeduty, -} from "@/api/performDuties"; +// import { +// getFactorCheckstandard, +// addSafeduty, +// updateSafeduty, +// } from "@/api/performDuties"; const formRef = ref(); const userStore = useUserStore(); diff --git a/src/views/system/message/add-modify-message.vue b/src/views/system/message/add-modify-message.vue new file mode 100644 index 0000000..663dd98 --- /dev/null +++ b/src/views/system/message/add-modify-message.vue @@ -0,0 +1,167 @@ + + + + + + \ No newline at end of file diff --git a/src/views/system/message/index.vue b/src/views/system/message/index.vue new file mode 100644 index 0000000..08e1bff --- /dev/null +++ b/src/views/system/message/index.vue @@ -0,0 +1,219 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/setting/protocol.vue b/src/views/system/setting/protocol.vue index 81ff0ed..42295d4 100644 --- a/src/views/system/setting/protocol.vue +++ b/src/views/system/setting/protocol.vue @@ -40,55 +40,49 @@ const getMsg = (val) => { diff --git a/src/views/work-manage/components/Add.vue b/src/views/work-manage/components/Add.vue index b145ec4..016802c 100644 --- a/src/views/work-manage/components/Add.vue +++ b/src/views/work-manage/components/Add.vue @@ -52,7 +52,7 @@ filterable /> - + 刷新
-
- - 导出 -
diff --git a/src/views/work-trends/components/Add.vue b/src/views/work-trends/components/Add.vue index 2878efc..6fca235 100644 --- a/src/views/work-trends/components/Add.vue +++ b/src/views/work-trends/components/Add.vue @@ -49,7 +49,7 @@ value-format="YYYY-MM-DD" /> - +