feat:文件夹的整理
Showing
9 changed files
with
126 additions
and
134 deletions
src/api/notice.js
deleted
100644 → 0
| 1 | import request from '@/utils/request' | ||
| 2 | import SERVER from './config' | ||
| 3 | |||
| 4 | // 新增系统通知 | ||
| 5 | export function addSysNotice (data) { | ||
| 6 | return request({ | ||
| 7 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
| 8 | method: 'post', | ||
| 9 | data | ||
| 10 | }) | ||
| 11 | } | ||
| 12 | |||
| 13 | //编辑系统通知 | ||
| 14 | export function updateSysNotice (data) { | ||
| 15 | return request({ | ||
| 16 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
| 17 | method: 'post', | ||
| 18 | data | ||
| 19 | }) | ||
| 20 | } | ||
| 21 | |||
| 22 | // 获取通知列表 | ||
| 23 | export function getSysNoticeList (data) { | ||
| 24 | return request({ | ||
| 25 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
| 26 | method: 'post', | ||
| 27 | data | ||
| 28 | }) | ||
| 29 | } | ||
| 30 | |||
| 31 | //获取法律法规列表 | ||
| 32 | export function getSysPolicyList (data) { | ||
| 33 | return request({ | ||
| 34 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
| 35 | method: 'post', | ||
| 36 | data | ||
| 37 | }) | ||
| 38 | } | ||
| 39 | |||
| 40 | //删除系统通知 | ||
| 41 | export function deleteSysNotice (params) { | ||
| 42 | return request({ | ||
| 43 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
| 44 | method: 'get', | ||
| 45 | params: params | ||
| 46 | }) | ||
| 47 | } | ||
| 48 | |||
| 49 | //发布通知 | ||
| 50 | export function publishNotice (params) { | ||
| 51 | return request({ | ||
| 52 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
| 53 | method: 'get', | ||
| 54 | params: params | ||
| 55 | }) | ||
| 56 | } | ||
| 57 | |||
| 58 | //取消发布通知 | ||
| 59 | export function unPublishNotice (params) { | ||
| 60 | return request({ | ||
| 61 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
| 62 | method: 'get', | ||
| 63 | params: params | ||
| 64 | }) | ||
| 65 | } | ||
| 66 | |||
| 67 | //设置已读状态 | ||
| 68 | export function setReadStatus (params) { | ||
| 69 | return request({ | ||
| 70 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
| 71 | method: 'get', | ||
| 72 | params: params | ||
| 73 | }) | ||
| 74 | } | ||
| 75 | |||
| 76 | //一键设置已读 | ||
| 77 | export function setAllRead () { | ||
| 78 | return request({ | ||
| 79 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
| 80 | method: 'get' | ||
| 81 | }) | ||
| 82 | } |
| ... | @@ -4,9 +4,9 @@ import SERVER from './config' | ... | @@ -4,9 +4,9 @@ import SERVER from './config' |
| 4 | // 上传单个文件 | 4 | // 上传单个文件 |
| 5 | export function upload (data) { | 5 | export function upload (data) { |
| 6 | return request({ | 6 | return request({ |
| 7 | url: SERVER.SERVERAPI + '/rest/file/upload', | 7 | url: SERVER.SERVERAPI + '/rest/file/upload', |
| 8 | method: 'post', | 8 | method: 'post', |
| 9 | data | 9 | data |
| 10 | }) | 10 | }) |
| 11 | } | 11 | } |
| 12 | 12 | ||
| ... | @@ -89,4 +89,86 @@ export function updateSysSqywmbsz (data) { | ... | @@ -89,4 +89,86 @@ export function updateSysSqywmbsz (data) { |
| 89 | method: 'put', | 89 | method: 'put', |
| 90 | data | 90 | data |
| 91 | }) | 91 | }) |
| 92 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 92 | } | ||
| 93 | |||
| 94 | |||
| 95 | // 通知 | ||
| 96 | // 新增系统通知 | ||
| 97 | export function addSysNotice (data) { | ||
| 98 | return request({ | ||
| 99 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
| 100 | method: 'post', | ||
| 101 | data | ||
| 102 | }) | ||
| 103 | } | ||
| 104 | |||
| 105 | //编辑系统通知 | ||
| 106 | export function updateSysNotice (data) { | ||
| 107 | return request({ | ||
| 108 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
| 109 | method: 'post', | ||
| 110 | data | ||
| 111 | }) | ||
| 112 | } | ||
| 113 | |||
| 114 | // 获取通知列表 | ||
| 115 | export function getSysNoticeList (data) { | ||
| 116 | return request({ | ||
| 117 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
| 118 | method: 'post', | ||
| 119 | data | ||
| 120 | }) | ||
| 121 | } | ||
| 122 | |||
| 123 | //获取法律法规列表 | ||
| 124 | export function getSysPolicyList (data) { | ||
| 125 | return request({ | ||
| 126 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
| 127 | method: 'post', | ||
| 128 | data | ||
| 129 | }) | ||
| 130 | } | ||
| 131 | |||
| 132 | //删除系统通知 | ||
| 133 | export function deleteSysNotice (params) { | ||
| 134 | return request({ | ||
| 135 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
| 136 | method: 'get', | ||
| 137 | params: params | ||
| 138 | }) | ||
| 139 | } | ||
| 140 | |||
| 141 | //发布通知 | ||
| 142 | export function publishNotice (params) { | ||
| 143 | return request({ | ||
| 144 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
| 145 | method: 'get', | ||
| 146 | params: params | ||
| 147 | }) | ||
| 148 | } | ||
| 149 | |||
| 150 | //取消发布通知 | ||
| 151 | export function unPublishNotice (params) { | ||
| 152 | return request({ | ||
| 153 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
| 154 | method: 'get', | ||
| 155 | params: params | ||
| 156 | }) | ||
| 157 | } | ||
| 158 | |||
| 159 | //设置已读状态 | ||
| 160 | export function setReadStatus (params) { | ||
| 161 | return request({ | ||
| 162 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
| 163 | method: 'get', | ||
| 164 | params: params | ||
| 165 | }) | ||
| 166 | } | ||
| 167 | |||
| 168 | //一键设置已读 | ||
| 169 | export function setAllRead () { | ||
| 170 | return request({ | ||
| 171 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
| 172 | method: 'get' | ||
| 173 | }) | ||
| 174 | } | ... | ... |
| ... | @@ -107,7 +107,6 @@ | ... | @@ -107,7 +107,6 @@ |
| 107 | import * as G2 from '@antv/g2' | 107 | import * as G2 from '@antv/g2' |
| 108 | import vueSeamlessScroll from "vue-seamless-scroll" | 108 | import vueSeamlessScroll from "vue-seamless-scroll" |
| 109 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/home.js"; | 109 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/home.js"; |
| 110 | import { setReadStatus } from "@/api/notice.js"; | ||
| 111 | import addDialog from "./components/addProject.vue"; | 110 | import addDialog from "./components/addProject.vue"; |
| 112 | export default { | 111 | export default { |
| 113 | name: 'home', | 112 | name: 'home', | ... | ... |
| ... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
| 25 | </template> | 25 | </template> |
| 26 | 26 | ||
| 27 | <script> | 27 | <script> |
| 28 | import { addSysNotice } from "@/api/notice.js" | 28 | import { addSysNotice } from "@/api/system.js" |
| 29 | import { upload } from "@/api/system.js" | 29 | import { upload } from "@/api/system.js" |
| 30 | export default { | 30 | export default { |
| 31 | props: { | 31 | props: { | ... | ... |
| ... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
| 31 | <script> | 31 | <script> |
| 32 | import table from "@/utils/mixin/table"; | 32 | import table from "@/utils/mixin/table"; |
| 33 | import { datas, sendThis } from "./flfgdata"; | 33 | import { datas, sendThis } from "./flfgdata"; |
| 34 | import { getSysPolicyList, deleteSysNotice } from "@/api/notice.js" | 34 | import { getSysPolicyList, deleteSysNotice } from "@/api/system.js" |
| 35 | import addDialog from "./components/addDialog.vue"; | 35 | import addDialog from "./components/addDialog.vue"; |
| 36 | export default { | 36 | export default { |
| 37 | name: "flfg", | 37 | name: "flfg", | ... | ... |
| ... | @@ -45,16 +45,15 @@ | ... | @@ -45,16 +45,15 @@ |
| 45 | </el-form> | 45 | </el-form> |
| 46 | </dialogBox> | 46 | </dialogBox> |
| 47 | </template> | 47 | </template> |
| 48 | |||
| 49 | <script> | 48 | <script> |
| 50 | import { addSysNotice,updateSysNotice } from "@/api/notice.js"; | 49 | import { addSysNotice, updateSysNotice } from "@/api/system.js"; |
| 51 | import { upload } from "@/api/system.js"; | 50 | import { upload } from "@/api/system.js"; |
| 52 | import { quillEditor } from "vue-quill-editor"; | 51 | import { quillEditor } from "vue-quill-editor"; |
| 53 | export default { | 52 | export default { |
| 54 | props: { | 53 | props: { |
| 55 | value: { type: Boolean, default: false }, | 54 | value: { type: Boolean, default: false }, |
| 56 | isButtonFlag: { type: Boolean, default: true }, | 55 | isButtonFlag: { type: Boolean, default: true }, |
| 57 | title: {type:String, default: '新增系统通知'} | 56 | title: { type: String, default: '新增系统通知' } |
| 58 | }, | 57 | }, |
| 59 | components: { quillEditor }, | 58 | components: { quillEditor }, |
| 60 | data () { | 59 | data () { |
| ... | @@ -145,15 +144,15 @@ export default { | ... | @@ -145,15 +144,15 @@ export default { |
| 145 | } | 144 | } |
| 146 | } | 145 | } |
| 147 | }, | 146 | }, |
| 148 | mounted () {}, | 147 | mounted () { }, |
| 149 | methods: { | 148 | methods: { |
| 150 | submitForm () { | 149 | submitForm () { |
| 151 | let that = this; | 150 | let that = this; |
| 152 | that.$refs.ruleForm.validate(valid => { | 151 | that.$refs.ruleForm.validate(valid => { |
| 153 | if (valid) { | 152 | if (valid) { |
| 154 | if(that.ruleForm.bsmNotice){ | 153 | if (that.ruleForm.bsmNotice) { |
| 155 | that.editNotice(); | 154 | that.editNotice(); |
| 156 | }else{ | 155 | } else { |
| 157 | that.addNotice(); | 156 | that.addNotice(); |
| 158 | } | 157 | } |
| 159 | } else { | 158 | } else { |
| ... | @@ -168,7 +167,7 @@ export default { | ... | @@ -168,7 +167,7 @@ export default { |
| 168 | this.resetRuleForm(); | 167 | this.resetRuleForm(); |
| 169 | }, | 168 | }, |
| 170 | //新增通知 | 169 | //新增通知 |
| 171 | addNotice(){ | 170 | addNotice () { |
| 172 | addSysNotice(this.ruleForm).then(res => { | 171 | addSysNotice(this.ruleForm).then(res => { |
| 173 | if (res.code == 200) { | 172 | if (res.code == 200) { |
| 174 | this.$message.success("保存成功"); | 173 | this.$message.success("保存成功"); |
| ... | @@ -181,7 +180,7 @@ export default { | ... | @@ -181,7 +180,7 @@ export default { |
| 181 | }); | 180 | }); |
| 182 | }, | 181 | }, |
| 183 | //编辑通知 | 182 | //编辑通知 |
| 184 | editNotice(){ | 183 | editNotice () { |
| 185 | updateSysNotice(this.ruleForm).then(res => { | 184 | updateSysNotice(this.ruleForm).then(res => { |
| 186 | if (res.code == 200) { | 185 | if (res.code == 200) { |
| 187 | this.$message.success("编辑成功"); | 186 | this.$message.success("编辑成功"); |
| ... | @@ -223,7 +222,7 @@ export default { | ... | @@ -223,7 +222,7 @@ export default { |
| 223 | clipboardPictureChange (file) { | 222 | clipboardPictureChange (file) { |
| 224 | this.uploadPicture(file) | 223 | this.uploadPicture(file) |
| 225 | }, | 224 | }, |
| 226 | getDetailInfo(item){ | 225 | getDetailInfo (item) { |
| 227 | this.ruleForm = item | 226 | this.ruleForm = item |
| 228 | }, | 227 | }, |
| 229 | uploadPicture (file) { | 228 | uploadPicture (file) { | ... | ... |
| ... | @@ -33,13 +33,13 @@ | ... | @@ -33,13 +33,13 @@ |
| 33 | :data="tableData.data"> | 33 | :data="tableData.data"> |
| 34 | </lb-table> | 34 | </lb-table> |
| 35 | </div> | 35 | </div> |
| 36 | <addDialog ref="addDialog" v-model="isDialog" :isButtonFlag="isButtonFlag" :title="dialogTitle"/> | 36 | <addDialog ref="addDialog" v-model="isDialog" :isButtonFlag="isButtonFlag" :title="dialogTitle" /> |
| 37 | </div> | 37 | </div> |
| 38 | </template> | 38 | </template> |
| 39 | <script> | 39 | <script> |
| 40 | import table from "@/utils/mixin/table"; | 40 | import table from "@/utils/mixin/table"; |
| 41 | import { datas, sendThis } from "./xttzdata"; | 41 | import { datas, sendThis } from "./xttzdata"; |
| 42 | import { getSysNoticeList, deleteSysNotice, publishNotice, unPublishNotice } from "@/api/notice.js" | 42 | import { getSysNoticeList, deleteSysNotice, publishNotice, unPublishNotice } from "@/api/system.js" |
| 43 | import addDialog from "./components/addDialog.vue"; | 43 | import addDialog from "./components/addDialog.vue"; |
| 44 | export default { | 44 | export default { |
| 45 | name: "xttz", | 45 | name: "xttz", |
| ... | @@ -91,7 +91,7 @@ export default { | ... | @@ -91,7 +91,7 @@ export default { |
| 91 | this.$refs.addDialog.getDetailInfo(item); | 91 | this.$refs.addDialog.getDetailInfo(item); |
| 92 | this.dialogTitle = '系统通知详情' | 92 | this.dialogTitle = '系统通知详情' |
| 93 | }) | 93 | }) |
| 94 | }else{ | 94 | } else { |
| 95 | this.isButtonFlag = true; | 95 | this.isButtonFlag = true; |
| 96 | this.dialogTitle = '新增系统通知' | 96 | this.dialogTitle = '新增系统通知' |
| 97 | } | 97 | } |
| ... | @@ -164,7 +164,7 @@ export default { | ... | @@ -164,7 +164,7 @@ export default { |
| 164 | }); | 164 | }); |
| 165 | }, | 165 | }, |
| 166 | //编辑通知 | 166 | //编辑通知 |
| 167 | editNotice(item) { | 167 | editNotice (item) { |
| 168 | this.$nextTick(() => { | 168 | this.$nextTick(() => { |
| 169 | this.isButtonFlag = true; | 169 | this.isButtonFlag = true; |
| 170 | this.$refs.addDialog.getDetailInfo(item); | 170 | this.$refs.addDialog.getDetailInfo(item); | ... | ... |
| ... | @@ -25,13 +25,13 @@ | ... | @@ -25,13 +25,13 @@ |
| 25 | :data="tableData.data"> | 25 | :data="tableData.data"> |
| 26 | </lb-table> | 26 | </lb-table> |
| 27 | </div> | 27 | </div> |
| 28 | <addDialog ref="addDialog" v-model="isDialog" :isButtonFlag="isButtonFlag" :title="dialogTitle"/> | 28 | <addDialog ref="addDialog" v-model="isDialog" :isButtonFlag="isButtonFlag" :title="dialogTitle" /> |
| 29 | </div> | 29 | </div> |
| 30 | </template> | 30 | </template> |
| 31 | <script> | 31 | <script> |
| 32 | import table from "@/utils/mixin/table"; | 32 | import table from "@/utils/mixin/table"; |
| 33 | import { datas, sendThis } from "./xttzviewdata"; | 33 | import { datas, sendThis } from "./xttzviewdata"; |
| 34 | import { getSysNoticeList,setReadStatus,setAllRead} from "@/api/notice.js" | 34 | import { getSysNoticeList, setReadStatus, setAllRead } from "@/api/system.js" |
| 35 | import addDialog from "./components/addDialog.vue"; | 35 | import addDialog from "./components/addDialog.vue"; |
| 36 | export default { | 36 | export default { |
| 37 | name: "xttzview", | 37 | name: "xttzview", |
| ... | @@ -73,33 +73,33 @@ export default { | ... | @@ -73,33 +73,33 @@ export default { |
| 73 | }, | 73 | }, |
| 74 | //打开新增弹窗 | 74 | //打开新增弹窗 |
| 75 | openDialog (item) { | 75 | openDialog (item) { |
| 76 | this.$nextTick(() => { | 76 | this.$nextTick(() => { |
| 77 | this.isButtonFlag = false; | 77 | this.isButtonFlag = false; |
| 78 | this.$refs.addDialog.getDetailInfo(item); | 78 | this.$refs.addDialog.getDetailInfo(item); |
| 79 | this.dialogTitle = '系统通知详情' | 79 | this.dialogTitle = '系统通知详情' |
| 80 | this.isDialog = true; | 80 | this.isDialog = true; |
| 81 | }) | 81 | }) |
| 82 | let that = this; | 82 | let that = this; |
| 83 | if(item.isRead == 1){ | 83 | if (item.isRead == 1) { |
| 84 | setReadStatus({bsmNotice: item.bsmNotice}).then(res => { | 84 | setReadStatus({ bsmNotice: item.bsmNotice }).then(res => { |
| 85 | if(res.code == 200){ | 85 | if (res.code == 200) { |
| 86 | that.$nextTick(()=> { | 86 | that.$nextTick(() => { |
| 87 | item.isRead = 2 | 87 | item.isRead = 2 |
| 88 | }) | ||
| 89 | } | ||
| 90 | }) | 88 | }) |
| 91 | } | 89 | } |
| 90 | }) | ||
| 91 | } | ||
| 92 | }, | 92 | }, |
| 93 | //一键已读 | 93 | //一键已读 |
| 94 | toReadAll(){ | 94 | toReadAll () { |
| 95 | setAllRead().then(res => { | 95 | setAllRead().then(res => { |
| 96 | if(res.code == 200){ | 96 | if (res.code == 200) { |
| 97 | this.$message.success('设置成功') | 97 | this.$message.success('设置成功') |
| 98 | this.queryClick(); | 98 | this.queryClick(); |
| 99 | }else{ | 99 | } else { |
| 100 | this.$message.error("设置失败") | 100 | this.$message.error("设置失败") |
| 101 | } | 101 | } |
| 102 | }) | 102 | }) |
| 103 | }, | 103 | }, |
| 104 | downloadFile (item) { | 104 | downloadFile (item) { |
| 105 | const href = item.noticeFileUrl | 105 | const href = item.noticeFileUrl | ... | ... |
| ... | @@ -143,12 +143,6 @@ export default { | ... | @@ -143,12 +143,6 @@ export default { |
| 143 | bsmSlsq: this.bsmSlsq, | 143 | bsmSlsq: this.bsmSlsq, |
| 144 | entryType: '1' | 144 | entryType: '1' |
| 145 | }, | 145 | }, |
| 146 | cancel: () => { | ||
| 147 | console.log("取消回调"); | ||
| 148 | }, | ||
| 149 | confirm: () => { | ||
| 150 | console.log("确认回调"); | ||
| 151 | }, | ||
| 152 | }) | 146 | }) |
| 153 | break; | 147 | break; |
| 154 | case "B7": | 148 | case "B7": | ... | ... |
-
Please register or sign in to post a comment