From 980f2615d819d7c33912dc3ad0156058872549a4 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 14 Mar 2022 14:02:01 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../humanisticCare/careDetail.vue | 311 ++++++++ .../secretaryLog/humanisticCare/careForm.vue | 604 +++++++++++++++ .../secretaryLog/humanisticCare/careList.vue | 694 ++++++++++++++++++ 3 files changed, 1609 insertions(+) create mode 100644 src/views/modules/secretaryLog/humanisticCare/careDetail.vue create mode 100644 src/views/modules/secretaryLog/humanisticCare/careForm.vue create mode 100644 src/views/modules/secretaryLog/humanisticCare/careList.vue diff --git a/src/views/modules/secretaryLog/humanisticCare/careDetail.vue b/src/views/modules/secretaryLog/humanisticCare/careDetail.vue new file mode 100644 index 00000000..8e979669 --- /dev/null +++ b/src/views/modules/secretaryLog/humanisticCare/careDetail.vue @@ -0,0 +1,311 @@ + + + + + + + + diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue new file mode 100644 index 00000000..b6708343 --- /dev/null +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -0,0 +1,604 @@ + + + + + + + + diff --git a/src/views/modules/secretaryLog/humanisticCare/careList.vue b/src/views/modules/secretaryLog/humanisticCare/careList.vue new file mode 100644 index 00000000..0fbdc006 --- /dev/null +++ b/src/views/modules/secretaryLog/humanisticCare/careList.vue @@ -0,0 +1,694 @@ + + + + From 7782dde70dc424eac3d2c571ac8629f74e14e94c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 15 Mar 2022 14:40:35 +0800 Subject: [PATCH 02/24] =?UTF-8?q?=E4=B9=A6=E8=AE=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../difficulty/difficultyDetail.vue | 311 ++++++++ .../difficulty/difficultyForm.vue | 604 +++++++++++++++ .../difficulty/difficultyList.vue | 694 ++++++++++++++++++ .../secretaryLog/humanisticCare/careForm.vue | 475 ++++-------- .../secretaryLog/humanisticCare/careList.vue | 162 ++-- 5 files changed, 1850 insertions(+), 396 deletions(-) create mode 100644 src/views/modules/secretaryLog/difficulty/difficultyDetail.vue create mode 100644 src/views/modules/secretaryLog/difficulty/difficultyForm.vue create mode 100644 src/views/modules/secretaryLog/difficulty/difficultyList.vue diff --git a/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue b/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue new file mode 100644 index 00000000..8e979669 --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue @@ -0,0 +1,311 @@ + + + + + + + + diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue new file mode 100644 index 00000000..b6708343 --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -0,0 +1,604 @@ + + + + + + + + diff --git a/src/views/modules/secretaryLog/difficulty/difficultyList.vue b/src/views/modules/secretaryLog/difficulty/difficultyList.vue new file mode 100644 index 00000000..89aac3c1 --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyList.vue @@ -0,0 +1,694 @@ + + + + diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index b6708343..745b01b0 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -9,69 +9,46 @@ :disabled="formType === 'detail'" class="form"> - - - - {{item.label}} - - - - - + style="display: block"> + + - - - {{item.label}} - - - + + - + + + + - @@ -80,114 +57,73 @@ maxlength="100" show-word-limit :rows="3" - placeholder="请输入活动目标,不超过100字" + placeholder="请输入关怀事项" v-model="formData.target"> - -
- - -

-
-
- - + + - - - -
- -
-
- -
-
- - - 查询 -
-
- -
- 经度 - - - 纬度 - - -
-
-
- - + prop="serviceMatterList"> - - + + + + - -
- - -

-
+ + + + 点击上传 +
只能上传word、excel、pdf文件
+
+ @@ -207,23 +143,28 @@ import { mapGetters } from 'vuex' import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' -import Tinymce from '@c/tinymce/index.vue' -var map -var search -var markers -var infoWindowList -var geocoder // 新建一个正逆地址解析类 + + let loading // 加载动画 export default { data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 + stateList: [ + { + value: '1', + label: '已完成' + }, + { + value: '2', + label: '未完成' + }, + ], btnDisable: false, - keyWords: '', activityId: '', formData: { serviceMatter: '',//服务事项 @@ -236,21 +177,34 @@ export default { activityTime: '',//活动时间 peopleCount: 0,//服务人数 result: '', //活动结果 - address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + + }, - serviceList: [] + serviceList: [], + + fileList: [ + // { + // name: 'food.jpeg', + // url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' + // }, { + // name: 'food2.jpeg', + // url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' + // } + ], + uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/upload-guide-file', + dialogImageUrl: '', + dialogVisible: false } }, - components: { Tinymce }, + components: {}, mounted () { - this.initMap() + }, methods: { + async initForm (type, activityId) { this.startLoading() this.$refs.ref_form.resetFields(); @@ -264,60 +218,13 @@ export default { this.formData.id = activityId await this.loadFormData() } else { - map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) - this.setMarker(36.0722275, 120.38945519) - } - this.endLoading() - - }, - - //获取服务事项下拉框 - async loadService () { - const url = "/heart/serviceitem/dict-list" - let params = { - type: 'usable' - // parentCategoryCode: '1010' - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.serviceList = data - - } else { - this.$message.error(msg) } + this.endLoading() }, - //加载组织 - async loadFormData () { - const url = '/heart/icpartyactivity/detail' - // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail' - let params = { - id: this.activityId - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.formData = data - console.log(this.formData.content) - let style_img = "style='width:50px;height:40px;' " - if (this.formData.content) { - this.formData.content = this.formData.content.replace(/ { - this.handleMoveCenter() - }) - this.handleMoveCenter() - this.convert() - }, + // if (!isLt2M) { + // this.$message.warning('上传模板大小不能超过 5MB!') + // return + // } - setMarker (lat, lng) { - markers.setGeometries([]) - markers.add([ - { - id: '4', - styleId: 'marker', - position: new TMap.LatLng(lat, lng), - properties: { - title: 'marker4' - } - } - ]) + // return false // 返回false不会自动上传 }, - handleSearchMap () { - infoWindowList.forEach((infoWindow) => { - infoWindow.close() - }) - infoWindowList.length = 0 - markers.setGeometries([]) - // 在地图显示范围内以给定的关键字搜索地点 - search - .searchRectangle({ - keyword: this.keyWords, - bounds: map.getBounds() - }) - .then((result) => { - let { data } = result - if (Array.isArray(data) && data.length > 0) { - const { - location: { lat, lng } - } = data[0] - - - map.setCenter(new TMap.LatLng(lat, lng)) - this.setMarker(lat, lng) - this.formData.latitude = lat - this.formData.longitude = lng - this.convert() - } else { - this.$message.error('未检索到相关位置坐标') - } - }) + handleFileRemove (file) { + + if (file && file.status === "success") { + this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1) + } }, - handleMoveCenter () { - //修改地图中心点 - const center = map.getCenter() - const lat = center.getLat() - const lng = center.getLng() - this.formData.latitude = lat - this.formData.longitude = lng - this.setMarker(lat, lng) - this.convert(lat, lng) + handleFileSuccess (res, file) { + + if (res.code === 0 && res.msg === 'success') { + const array = file.name.split('.') + const fileType = array[array.length - 1] + + file.url = res.data.url + file.type = fileType + this.fileList.push(file) + console.log(this.fileList) + } else this.$message.error(res.msg) }, - convert (lat, lng) { - markers.setGeometries([]); - // var input = document.getElementById('location').value.split(','); - let location - if (lat && lng) { - location = new TMap.LatLng(lat, lng); - } else { - location = new TMap.LatLng(this.formData.latitude, this.formData.longitude); - } - // map.setCenter(location); - markers.updateGeometries([ - { - id: 'main', // 点标注数据数组 - position: location, - }, - ]); - geocoder - .getAddress({ location: location }) // 将给定的坐标位置转换为地址 - .then((result) => { - this.formData.address = result.result.address - // 显示搜索到的地址 - }); + //下载 + handleFileDownload (file) { + + var a = document.createElement('a'); + var event = new MouseEvent('click'); + a.download = file.name; + console.log(a) + a.href = file.url; + a.dispatchEvent(event); + + }, resetData () { this.activityId = '' - this.keyWords = '' + this.formData = { serviceMatter: '',//服务事项 serviceMatterList: [], @@ -488,9 +341,7 @@ export default { activityTime: '',//活动时间 peopleCount: 0,//服务人数 result: '', //活动结果 - address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + } }, // 开启加载动画 @@ -534,9 +385,7 @@ export default { result: [ { required: true, message: '活动结果不能为空', trigger: 'blur' } ], - address: [ - { required: true, message: '详细地址不能为空', trigger: 'blur' } - ], + longitude: [ { required: true, message: '坐标不能为空', trigger: 'blur' } ] @@ -566,31 +415,11 @@ export default { From d351b0f396cc5d5460fb8ea5c5c19fbe66cdf6b7 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 16 Mar 2022 14:34:19 +0800 Subject: [PATCH 04/24] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/store/index.js | 2 +- src/views/main-content.vue | 54 +++++++++++++++++++++ src/views/tips.vue | 97 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 src/views/tips.vue diff --git a/src/js/store/index.js b/src/js/store/index.js index 483238a6..a803ca87 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -37,7 +37,7 @@ export default new Vuex.Store({ menuList: [], activeName: "", }, - + tipsList: [], inIframe: window.self !== window.top, }, modules: { diff --git a/src/views/main-content.vue b/src/views/main-content.vue index 08c7e249..5ce37b09 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -69,18 +69,48 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/views/tips.vue b/src/views/tips.vue new file mode 100644 index 00000000..7e1092b3 --- /dev/null +++ b/src/views/tips.vue @@ -0,0 +1,97 @@ + + + + + \ No newline at end of file From 2bf2d2a06b99882f66163014ec957cf776af272e Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 16 Mar 2022 16:46:24 +0800 Subject: [PATCH 05/24] ssdfsf --- src/assets/scss/c/config.scss | 2 +- src/assets/scss/c/function.scss | 15 +- .../scss/modules/shujirizhi-notice.scss | 62 +++ src/views/main.vue | 44 ++- .../modules/secretaryLog/cpts/notice.vue | 360 ++++-------------- 5 files changed, 167 insertions(+), 316 deletions(-) create mode 100644 src/assets/scss/modules/shujirizhi-notice.scss diff --git a/src/assets/scss/c/config.scss b/src/assets/scss/c/config.scss index e3555368..10221912 100644 --- a/src/assets/scss/c/config.scss +++ b/src/assets/scss/c/config.scss @@ -11,7 +11,7 @@ $w1: 1200px; //网站主色 primary color bgcolor $c1: #ff4c52; // 红 dd000f -$c2: #3b7cff; +$c2: #3e8ef7; //灰度色 用于字体 $fc0: #010033; diff --git a/src/assets/scss/c/function.scss b/src/assets/scss/c/function.scss index 90fb9dae..74b02097 100644 --- a/src/assets/scss/c/function.scss +++ b/src/assets/scss/c/function.scss @@ -87,6 +87,15 @@ text-overflow: ellipsis; word-wrap: normal; } + +// 强制文本换行 多行 +@mixin toeM($num) { + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: $num; + -webkit-box-orient: vertical; +} // 图片居中 @mixin img_hub { position: absolute; @@ -206,7 +215,7 @@ } //党员积分排行榜 @mixin img123 { - width:20px; + width: 20px; height: 20px; border-radius: 50%; position: absolute; @@ -225,7 +234,7 @@ width: 67.15px; height: 67.15px; position: absolute; - display: block; + display: block; top: 4px; border-radius: 100%; } @@ -258,11 +267,9 @@ display: block; z-index: 10; margin-top: 40px; - } @mixin list { list-style-type: none; position: absolute; padding: 0px; } - diff --git a/src/assets/scss/modules/shujirizhi-notice.scss b/src/assets/scss/modules/shujirizhi-notice.scss new file mode 100644 index 00000000..8d717a03 --- /dev/null +++ b/src/assets/scss/modules/shujirizhi-notice.scss @@ -0,0 +1,62 @@ +@import "../c/anime"; +@import "../c/config"; +@import "../c/function"; + +.m-notice { + position: fixed; + z-index: 10000; + bottom: 0; + right: 0; + background-color: #fff; + box-shadow: 0 0 10px 0 rgba(#000, 0.1); + width: 500px; + height: 300px; + box-sizing: border-box; + padding: 25px; + + .header { + margin-bottom: 20px; + font-size: 24px; + font-weight: bold; + color: #3e8ef7; + } + .type { + margin-bottom: 10px; + font-size: 20px; + font-weight: bold; + color: #333; + } + .content { + @include toeM(2); + margin-bottom: 10px; + font-size: 16px; + color: #333; + line-height: 30px; + } + .date { + margin-bottom: 30px; + font-size: 16px; + color: #999; + line-height: 30px; + } + .operate { + display: flex; + justify-content: space-around; + + .btn { + box-sizing: border-box; + padding: 0 20px; + width: 180px; + text-align: center; + font-size: 20px; + color: #3e8ef7; + line-height: 40px; + cursor: pointer; + + &.z-stress { + background-color: #3e8ef7; + color: #fff; + } + } + } +} diff --git a/src/views/main.vue b/src/views/main.vue index 9ecf523e..479c782f 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -1,24 +1,30 @@ @@ -28,16 +34,17 @@ import MainNavbar from "./main-navbar"; import MainSidebar from "./main-sidebar"; import MainContent from "./main-content"; import MainThemeTools from "./main-theme-tools"; +import SecretaryLogNotice from "./modules/secretaryLog/cpts/notice"; import debounce from "lodash/debounce"; import { mapGetters } from "vuex"; import nextTick from "dai-js/tools/nextTick"; import { requestPost } from "@/js/dai/request"; export default { - provide () { + provide() { return { // 刷新 - refresh () { + refresh() { this.$store.state.contentIsNeedRefresh = true; this.$nextTick(() => { this.$store.state.contentIsNeedRefresh = false; @@ -45,7 +52,7 @@ export default { }, }; }, - data () { + data() { return { loading: true, userType: localStorage.getItem("userType"), @@ -56,12 +63,13 @@ export default { MainSidebar, MainContent, MainThemeTools, + SecretaryLogNotice, }, watch: { $route: "routeHandle", }, - async created () { + async created() { this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"]; console.log(this.$store.state.sidebarMenuList); @@ -73,11 +81,11 @@ export default { }, computed: {}, methods: { - changeCustomerName (customerName) { + changeCustomerName(customerName) { this.$refs["ref_navbar"].changeCustomerName(customerName); }, // 窗口改变大小 - windowResizeHandle () { + windowResizeHandle() { this.$store.state.sidebarFold = document.documentElement["clientWidth"] <= 992 || false; window.addEventListener( @@ -89,7 +97,7 @@ export default { ); }, // 路由, 监听 - routeHandle (route) { + routeHandle(route) { if (!route.meta.isTab) { return false; } @@ -112,7 +120,7 @@ export default { this.$store.state.contentTabsActiveName = tab.name; this.syncLevelOneMenuActive(tab.menuId); }, - async syncLevelOneMenuActive (menuId) { + async syncLevelOneMenuActive(menuId) { await nextTick(); console.log( "*******************************", @@ -135,7 +143,7 @@ export default { idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : []; }, // 获取当前管理员信息 - async getWorkUserInfo () { + async getWorkUserInfo() { const url = "/epmetuser/customerstaff/staffbasicinfo"; let params = {}; const { data, code, msg } = await requestPost(url, params); diff --git a/src/views/modules/secretaryLog/cpts/notice.vue b/src/views/modules/secretaryLog/cpts/notice.vue index 6ddb547a..5fd0960f 100644 --- a/src/views/modules/secretaryLog/cpts/notice.vue +++ b/src/views/modules/secretaryLog/cpts/notice.vue @@ -1,6 +1,13 @@ @@ -9,320 +16,87 @@ import { requestPost } from "@/js/dai/request2"; import nextTick from "dai-js/tools/nextTick"; export default { - components: { }, + components: {}, data() { return { - agencyId: "", - - tableData: [], - - currentIndex: 0, + displayed: false, + + lastTime: 0, + + list: [ + { + memoId: "1", + type: "work_diary", + typeName: "工作日志", + content: + "提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容", + remindTime: "2022-02-22 22:22", + }, + ], }; }, - computed: { - }, + computed: {}, watch: { - currentIndex() { - }, + currentIndex() {}, }, async mounted() { - await this.loadAgency(); - await this.getTableData(); + this.poll(); }, methods: { - async handleDel() { - if (!confirm("删除后不可恢复,确定删除?")) return; - - const item = this.tableData[this.currentIndex]; - const url = "/gov/org/icpartyservicecenter/del"; - - const { data, code, msg } = await requestPost(url, [ - item.partyServiceCenterId, - ]); + async poll() { + let nowTime = new Date().getTime(); + if (nowTime - this.lastTime > 60 * 1000) { + this.lastTime = nowTime; + this.getList(); + } + await nextTick(1000); + this.poll(); + }, - if (code === 0) { - this.$message.success("删除成功!"); - this.getTableData(); + checkInfo() { + const { memoId, type } = this.list[0]; + if (type == "work_diary") { + this.$router.push({ + path: `/main/visual-basicinfo-people/${uid}`, + }); + } else if (type == "concern") { + } else if (type == "difficulty") { } + + this.read(); }, - async getTableData() { - const oldLen = this.tableData.length; - const url = "/gov/org/icpartyservicecenter/partyservicecenterlist"; + async read() { + const item = this.list[0]; + const url = "/gov/project/memoAttr/setReaded"; + const { data, code, msg } = await requestPost(url, { - orgId: this.agencyId, - orgType: "agency", + memoId: item.memoId, }); - if (code === 0) { - console.log("列表请求成功!!!!!!!!!!!!!!"); - this.tableData = data; - - if (data.length > 0 && oldLen == 0) { - await nextTick(100); - this.initMap(); - this.setMap(); - } + if (code === 0) { + // this.$message.success("删除成功!"); + this.displayed = false; + this.getList(); } }, - //加载组织 - async loadAgency() { - const url = "/epmetuser/customerstaff/staffbasicinfo"; - let params = {}; - - const { data, code, msg } = await requestPost(url, params); - + async getList() { + const url = "/gov/project/memoAttr/memosToRemind"; + const { data, code, msg } = await requestPost(url, {}); if (code === 0) { - this.agencyId = data.agencyId; + console.log("列表请求成功!!!!!!!!!!!!!!"); + this.displayed = true; + this.lastTime = new Date().getTime(); + // this.list = data; } }, }, }; - + From 66215bc144895946d9f2ac9adc13da185f21b1ee Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 16 Mar 2022 16:54:21 +0800 Subject: [PATCH 06/24] dd --- src/js/store/index.js | 35 +++++++++++++++++++ src/views/main-content.vue | 61 ++++++++++++++++++++++++++------- src/views/modules/base/resi.vue | 10 +++--- src/views/tips.vue | 12 +++++-- 4 files changed, 99 insertions(+), 19 deletions(-) diff --git a/src/js/store/index.js b/src/js/store/index.js index a803ca87..7dfbb567 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -4,6 +4,7 @@ import cloneDeep from "lodash/cloneDeep"; import user from "./modules/user"; import app from "./modules/app"; import tagsView from "./modules/tagsView"; +import { requestPost } from "@/js/dai/request"; Vue.use(Vuex); @@ -38,6 +39,7 @@ export default new Vuex.Store({ activeName: "", }, tipsList: [], + tipsTime: [], inIframe: window.self !== window.top, }, modules: { @@ -52,5 +54,38 @@ export default new Vuex.Store({ state[key] = cloneDeep(window.SITE_CONFIG["storeState"][key]); }); }, + SET_TIPS_LIST(state, tipsList) { + let _list = state.tipsList + state.tipsList = _list.concat(tipsList) + }, + SET_TIPS_TIME(state, time) { + state.tipsTime = time + } }, + actions: { + setTipsList({ commit }, time) { + return new Promise(async (resolve, reject) => { + const url = '/gov/project/memoAttr/memosToRemind' + const params = { + remindTime: time || '' + } + const { data, code, msg } = await requestPost(url, params) + if (code === 0) { + commit('SET_TIPS_LIST', data) + resolve() + } else reject(msg) + }) + }, + setTipsTime({ commit }) { + return new Promise(async (resolve, reject) => { + const url = '/gov/project/memoAttr/memoTime' + + const { data, code, msg } = await requestPost(url) + if (code === 0) { + commit('SET_TIPS_TIME', data) + resolve() + } else reject(msg) + }) + } + } }); diff --git a/src/views/main-content.vue b/src/views/main-content.vue index 5ce37b09..c691d133 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -70,9 +70,13 @@ - + - + @@ -96,6 +100,7 @@ import { isURL } from "@/utils/validate"; import Cookie from "js-cookie"; import Tips from './tips.vue' +import { requestPost } from "@/js/dai/request"; export default { components: { Tips @@ -120,7 +125,7 @@ export default { this.token = localStorage.getItem("token"); this.customerId = localStorage.getItem("customerId"); - // this.loopTips() + this.loopTips() }, methods: { changeCustomerName(customerName) { @@ -207,17 +212,49 @@ export default { iframe.postMessage({ name: "lalalal" }, "*"); }, loopTips() { - let id = 1 - this.timer = setInterval(() => { - id = id + 1 - if (id == 5) clearInterval(this.timer) - this.tipsList.push(id) - console.log('id------0', id) - }, 1000) + this.$store.dispatch('setTipsList') + this.$store.dispatch('setTipsTime') + // let id = 1 + // this.timer = setInterval(() => { + // id = id + 1 + // if (id == 5) clearInterval(this.timer) + // this.tipsList.push(id) + // console.log('id------0', id) + // }, 1000) + }, + async closeTips(memoId) { + const url = '/gov/project/memoAttr/setReaded' + const params = { + memoId + } + const { data, code, msg } = await requestPost(url, params) + if (code != 0) this.$message.error(msg) + }, + async getInfo(item) { + const urls = { + work_diary: '/gov/project/memoWorkDiary', + concern: '/gov/project/memoConcern', + difficulty: '/gov/project/memoDifficulty/detail' + } + const params = { + id: item.memoId, + readFlag: 0 + } + const { data, code, msg } = await requestPost(urls[item.type], params) + if (code == 0) { + this.form = { ...data } + } else this.$message.error(msg) + }, + handleClose(item, index) { + console.log('close-----', item) + this.$store.state.tipsList.splice(index, 1) + this.closeTips(item.memoId) }, - handleLook(id) { - console.log('look-----', id) + async handleLook(item) { + console.log('look-----', item) + await this.getInfo(item) this.dialogFormVisible = true + } }, }; diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 2d9d49cf..63dce11e 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -12,11 +12,12 @@ @click="handleAdd">新增 下载人口模板 + @click="handleExportModule('room')">下载模板 + > + @@ -223,7 +227,6 @@ class="dialog-h" @closed="diaClose"> @@ -231,13 +234,12 @@ + @closed="diaClose"> @@ -262,53 +264,38 @@ export default { pageSize: 10, pageNo: 0, tableLoading: false, - agencyId: '', - unitList: [],//单位list - serviceList: [ - { - id: "1", - name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。' - }, - { - id: "2", - name: '积极配合' - }, + + stateList: [ { - id: "3", - name: '积极配合社区安全巡查员进行' + value: 1, + label: '已完成' }, { - id: "4", - name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。并具备安全意识及设备设施' + value: 0, + label: '未完成' }, - ],//服务list - pickerOptions: { //控制时间范围 - disabledDate (time) { - return time.getTime() > (Date.now() - (24 * 60 * 60 * 1000)) - } - }, + ], + scheduledTimeRange: [], timeRange: [], - unitId: '', formData: { - unitId: '', - title: '', - serviceMatter: '', - startTime: '', - endTime: '' + content: '',//关怀事项 + concernType: '',//关怀类型 + resiName: '',//关怀人员 + status: '',//状态 0未完成 1已完成 + startTime: '',//开始时间 yyyy-mm-dd + endTime: '',//结束时间 yyyy-mm-dd + scheduledStartTime: '',//预计关怀开始时间 yyyy-mm-dd + scheduledEndTime: '',//预计关怀结束时间 yyyy-mm-dd }, tableData: [], //form相关 formShow: false, - formTitle: '新增活动', + formTitle: '新增', detailShow: false, - files: "", - fileName: "", - uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import' - } }, components: { @@ -318,14 +305,7 @@ export default { }, async mounted () { - //获取服务事项 - await this.loadService() - const { user } = this.$store.state - this.agencyId = user.agencyId - - //获取建联单位 - await this.loadUnit() //获取网格下拉框数据 await this.loadTable() }, @@ -335,52 +315,12 @@ export default { this.loadTable() }, - async loadUnit () { - const url = "/heart/icpartyunit/option" - // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option" - - let params = { - agencyId: this.agencyId - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.unitList = data - - } else { - this.$message.error(msg) - } - - }, - - //获取服务事项下拉框 - async loadService () { - const url = "/heart/serviceitem/dict-list" - - - let params = { - // parentCategoryCode: '1010' - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.serviceList = data - - } else { - this.$message.error(msg) - } - - }, - async loadTable () { this.tableLoading = true - const url = "/heart/icpartyactivity/search" - // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" + const url = "/gov/project/memoConcern/page" + // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/page" let params = { - agencyId: this.agencyId, pageSize: this.pageSize, pageNo: this.pageNo, ...this.formData @@ -400,21 +340,23 @@ export default { diaClose () { - this.$refs.ref_form.resetData() - this.formShow = false - }, + if (this.formShow) { + // this.$refs.ref_form.resetData() + this.formShow = false + } else { + this.detailShow = false + } + - detailClosed () { - this.detailShow = false }, + handleDetail (row) { - // this.detailShow = true + this.detailShow = true this.formTitle = '详情' - this.formShow = true this.$nextTick(() => { - // this.$refs.ref_detail.initForm(row) - this.$refs.ref_form.initForm('detail', row.id) + this.$refs.ref_detail.initForm(row) + }) }, @@ -451,7 +393,7 @@ export default { type: "warning" }) .then(() => { - this.deleteActivity(row) + this.deleteCare(row) }) .catch(err => { if (err == "cancel") { @@ -461,15 +403,15 @@ export default { }); }, - async deleteActivity (row) { - const url = "/heart/icpartyactivity/delete" - // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete" - + async deleteCare (row) { + const url = "/gov/project/memoConcern/delete" + // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/delete" + let ids = [row.id] let params = { - id: row.id + ids: ids } - const { data, code, msg } = await requestPost(url, params) + const { data, code, msg } = await requestPost(url, ids) if (code === 0) { this.$message({ @@ -485,14 +427,17 @@ export default { //重置搜索条件 resetSearch () { + this.scheduledTimeRange = [] this.timeRange = [] this.formData = { - gridId: '', - unitName: '', - serviceMatter: '', - type: '', - contact: '', - contactMobile: '' + content: '',//关怀事项 + concernType: '',//关怀类型 + resiName: '',//关怀人员 + status: '',//状态 0未完成 1已完成 + startTime: '',//开始时间 yyyy-mm-dd + endTime: '',//结束时间 yyyy-mm-dd + scheduledStartTime: '',//预计关怀开始时间 yyyy-mm-dd + scheduledEndTime: '',//预计关怀结束时间 yyyy-mm-dd } this.pageSize = 10 this.pageNo = 0 @@ -500,23 +445,18 @@ export default { }, //导出表格 - async handleExport () { - let title = '联建活动列表' - - const url = "/heart/icpartyactivity/export" - let params = { - agencyId: this.agencyId, + async handleExport (row) { + let title = '人员关怀' - ...this.formData - - } + let url = `/gov/project/memoConcern/${row.id}/exportWord` + let params = {} app.ajax.exportFilePost( url, params, (data, rspMsg) => { - this.download(data, title + '.xls') + this.download(data, title + '.doc') }, (rspMsg, data) => { this.$message.error(rspMsg); @@ -551,72 +491,27 @@ export default { }, - // 上传文件之前的钩子 - beforeUpload (file) { - this.files = file; - - const isText = file.type === 'application/vnd.ms-excel' - const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + handleScheduledTimeChange (time) { + if (time) { + this.formData.scheduledStartTime = time[0] + this.formData.scheduledEndTime = time[1] - if (!isText && !isTextComputer) { - this.$message.error('请选择正确格式的文件') - return false } else { - this.fileName = file.name; - return true - } + this.formData.scheduledStartTime = '' + this.formData.scheduledEndTime = '' - }, - // 上传文件个数超过定义的数量 - handleExceed (files, fileList) { - this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) - }, - - async uploadFile () { - this.loading = true - - if (this.fileName == "") { - this.$message.warning('请选择要上传的文件!') - return false } - //清空上传列表 - this.$refs['upload'].clearFiles() - - var url = '/heart/icpartyactivity/import' - let fileFormData = new FormData(); - fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - - const { data, code, msg } = await requestPost(url, fileFormData) - if (code === 0) { - this.$message({ - type: "success", - message: "导入成功" - }); - - this.loadTable() - } else { - this.$message.error(msg) - } - - }, - handleTimeChange (time) { if (time) { - const startTimeArray = util.dateFormatter(time[0], 'date').split('-') - const endTimeArray = util.dateFormatter(time[1], 'date').split('-') - - this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00' - this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59' + this.formData.startTime = time[0] + this.formData.endTime = time[1] - // this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日' - // this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日' } else { this.formData.startTime = '' this.formData.endTime = '' - // this.startTimeShow = '' - // this.endTimeShow = '' + } }, @@ -653,9 +548,7 @@ export default { return (this.clientHeight - 430) }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, + ...mapGetters(['clientHeight']) }, watch: { From 055097960d71180f238872fddaea2383b87359bd Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 17 Mar 2022 14:04:49 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E4=BA=BA=E6=96=87=E5=85=B3=E6=80=80?= =?UTF-8?q?=E3=80=81=E9=9A=BE=E7=82=B9=E5=A0=B5=E7=82=B9=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/secretaryLog/difficulty/difficultyForm.vue | 5 +++-- .../modules/secretaryLog/difficulty/difficultyList.vue | 6 ++++-- src/views/modules/secretaryLog/humanisticCare/careForm.vue | 5 +++-- src/views/modules/secretaryLog/humanisticCare/careList.vue | 6 ++++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue index e271db26..46bc5df7 100644 --- a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -6,6 +6,7 @@ :inline="true" :model="formData" :rules="dataRule" + :disabled="formType==='detail'" class="form"> { - this.$refs.ref_detail.initForm(row) + this.$refs.ref_form.initForm('detail', row.id) + // this.$refs.ref_detail.initForm(row) }) }, diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index 257acb56..086223d4 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -6,6 +6,7 @@ :inline="true" :model="formData" :rules="dataRule" + :disabled="formType==='detail'" class="form"> { - this.$refs.ref_detail.initForm(row) + // this.$refs.ref_detail.initForm(row) + this.$refs.ref_form.initForm('detail', row.id) }) }, From 1f21fb1d43a8e18062a0b81fe1b399c290a15670 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 17 Mar 2022 15:27:59 +0800 Subject: [PATCH 09/24] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/store/index.js | 39 +- src/utils/index.js | 22 + src/views/main-content.vue | 77 ++- .../difficulty/difficultyForm.vue | 10 +- .../difficulty/difficultyList.vue | 2 +- .../secretaryLog/humanisticCare/careForm.vue | 10 +- .../secretaryLog/humanisticCare/careList.vue | 2 +- .../modules/secretaryLog/workLog/form.vue | 358 +++++++++++++ .../modules/secretaryLog/workLog/index.vue | 474 ++++++++++++++++++ src/views/tips.vue | 8 +- 10 files changed, 961 insertions(+), 41 deletions(-) create mode 100644 src/views/modules/secretaryLog/workLog/form.vue create mode 100644 src/views/modules/secretaryLog/workLog/index.vue diff --git a/src/js/store/index.js b/src/js/store/index.js index 7dfbb567..2b254ac2 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -5,9 +5,10 @@ import user from "./modules/user"; import app from "./modules/app"; import tagsView from "./modules/tagsView"; import { requestPost } from "@/js/dai/request"; +import { dateFormats } from "@/utils/index"; Vue.use(Vuex); - +let interTimer = null export default new Vuex.Store({ namespaced: true, state: { @@ -56,13 +57,42 @@ export default new Vuex.Store({ }, SET_TIPS_LIST(state, tipsList) { let _list = state.tipsList - state.tipsList = _list.concat(tipsList) + // state.tipsList = _list.concat(tipsList) + state.tipsList = tipsList }, SET_TIPS_TIME(state, time) { state.tipsTime = time } }, actions: { + clearInter() { + clearInterval(interTimer) + }, + setInterval({ commit, dispatch, state }) { + interTimer = setInterval(() => { + const _t = dateFormats('YYYY-mm-dd HH:MM', (new Date(new Date().toLocaleDateString()).getTime())) + const _tt = new Date(_t).getTime() + console.log('230000---', _t) + const t = dateFormats('YYYY-mm-dd HH:MM', (new Date().getTime())) + const nt = new Date(t).getTime() + // 判断当前时间是否为 00:00 + if (nt == _tt) { + dispatch('setTipsTime') + return + } + let times = state.tipsTime + console.log('nt---000', nt) + state.tipsTime.forEach((item, index) => { + const _t = new Date(item).getTime() + if (_t == nt) { + clearInterval(interTimer) + dispatch('setTipsList', item) + times.splice(index, 1) + commit('SET_TIPS_TIME', times) + } + }) + }, 10000) + }, setTipsList({ commit }, time) { return new Promise(async (resolve, reject) => { const url = '/gov/project/memoAttr/memosToRemind' @@ -76,13 +106,16 @@ export default new Vuex.Store({ } else reject(msg) }) }, - setTipsTime({ commit }) { + setTipsTime({ commit, dispatch }) { return new Promise(async (resolve, reject) => { + if (interTimer) clearInterval(interTimer) const url = '/gov/project/memoAttr/memoTime' const { data, code, msg } = await requestPost(url) if (code === 0) { + commit('SET_TIPS_TIME', data) + if (data.length > 0) dispatch('setInterval') resolve() } else reject(msg) }) diff --git a/src/utils/index.js b/src/utils/index.js index ad9c9e00..fe742c9a 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -93,3 +93,25 @@ export function treeDataTranslate(data, id = 'id', pid = 'pid') { } return res } + +// 时间格式化 +export function dateFormats(fmt, date) { + let ret + const _date = new Date(date) + const opt = { + 'Y+': _date.getFullYear().toString(), // 年 + 'm+': (_date.getMonth() + 1).toString(), // 月 + 'd+': _date.getDate().toString(), // 日 + 'H+': _date.getHours().toString(), // 时 + 'M+': _date.getMinutes().toString(), // 分 + 'S+': _date.getSeconds().toString() // 秒 + // 有其他格式化字符需求可以继续添加,必须转化成字符串 + } + for (const k in opt) { + ret = new RegExp('(' + k + ')').exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], (ret[1].length === 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, '0'))) + } + } + return fmt +} diff --git a/src/views/main-content.vue b/src/views/main-content.vue index c691d133..569b149f 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -70,28 +70,29 @@ - @@ -101,19 +102,25 @@ import { isURL } from "@/utils/validate"; import Cookie from "js-cookie"; import Tips from './tips.vue' import { requestPost } from "@/js/dai/request"; +import workForm from './modules/secretaryLog/workLog/form.vue' +import dForm from './modules/secretaryLog/difficulty/difficultyForm.vue' +import hForm from './modules/secretaryLog/humanisticCare/careForm.vue' export default { components: { - Tips + Tips, + workForm, + dForm, + hForm }, data() { return { + dialogTitle: '', dialogFormVisible: false, iframeUrl: "", token: "", customerId: "", - form: { - - }, + form: {}, + formType: '', formLabelWidth: '120px', tipsList: [] }; @@ -127,6 +134,11 @@ export default { this.loopTips() }, + computed: { + msgList() { + return this.$store.state.tipsList + } + }, methods: { changeCustomerName(customerName) { this.$emit("changeCustomerName", customerName); @@ -250,11 +262,26 @@ export default { this.$store.state.tipsList.splice(index, 1) this.closeTips(item.memoId) }, - async handleLook(item) { + async handleLook(item, index) { console.log('look-----', item) - await this.getInfo(item) + const formType = { + work_diary: 'ref_form', + concern: 'concern_form', + difficulty: 'difficulty_form' + } + this.dialogTitle = item.typeName + // await this.getInfo(item) + this.formType = item.type this.dialogFormVisible = true + console.log('ref0-----', this.formType) + this.$nextTick(() => { + console.log('this.$refs-----', this.$refs) + this.$refs[formType[item.type]].initForm('look', item.memoId) + this.$store.state.tipsList.splice(index, 1) + this.closeTips(item.memoId) + }) + } }, }; diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue index 46bc5df7..02760a1d 100644 --- a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -6,7 +6,7 @@ :inline="true" :model="formData" :rules="dataRule" - :disabled="formType==='detail'" + :disabled="formType==='look'" class="form"> 取 消 - 确 定 @@ -196,13 +196,15 @@ export default { setTimeout(() => { this.btnDisable = false }, 10000) - this.$refs['ref_form'].validate((valid, messageObj) => { + this.$refs['ref_form'].validate(async (valid, messageObj) => { if (!valid) { app.util.validateRule(messageObj) this.btnDisable = false } else { - this.addDifficulty() + await this.addDifficulty() + this.$store.dispatch('setTipsList') + this.$store.dispatch('setTipsTime') } }) diff --git a/src/views/modules/secretaryLog/difficulty/difficultyList.vue b/src/views/modules/secretaryLog/difficulty/difficultyList.vue index 90e9d8f1..933474da 100644 --- a/src/views/modules/secretaryLog/difficulty/difficultyList.vue +++ b/src/views/modules/secretaryLog/difficulty/difficultyList.vue @@ -286,7 +286,7 @@ export default { this.formShow = true this.formTitle = '详情' this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row.id) + this.$refs.ref_form.initForm('look', row.id) // this.$refs.ref_detail.initForm(row) }) diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index 086223d4..2dc54f2a 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -6,7 +6,7 @@ :inline="true" :model="formData" :rules="dataRule" - :disabled="formType==='detail'" + :disabled="formType==='look'" class="form"> 取 消 - 确 定 @@ -241,13 +241,15 @@ export default { setTimeout(() => { this.btnDisable = false }, 10000) - this.$refs['ref_form'].validate((valid, messageObj) => { + this.$refs['ref_form'].validate(async (valid, messageObj) => { if (!valid) { app.util.validateRule(messageObj) this.btnDisable = false } else { - this.addCare() + await this.addCare() + this.$store.dispatch('setTipsList') + this.$store.dispatch('setTipsTime') } }) diff --git a/src/views/modules/secretaryLog/humanisticCare/careList.vue b/src/views/modules/secretaryLog/humanisticCare/careList.vue index afb7f687..a712923c 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careList.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careList.vue @@ -357,7 +357,7 @@ export default { this.formTitle = '详情' this.$nextTick(() => { // this.$refs.ref_detail.initForm(row) - this.$refs.ref_form.initForm('detail', row.id) + this.$refs.ref_form.initForm('look', row.id) }) }, diff --git a/src/views/modules/secretaryLog/workLog/form.vue b/src/views/modules/secretaryLog/workLog/form.vue new file mode 100644 index 00000000..7d7961ae --- /dev/null +++ b/src/views/modules/secretaryLog/workLog/form.vue @@ -0,0 +1,358 @@ + + + + + + + + diff --git a/src/views/modules/secretaryLog/workLog/index.vue b/src/views/modules/secretaryLog/workLog/index.vue new file mode 100644 index 00000000..57e2f85b --- /dev/null +++ b/src/views/modules/secretaryLog/workLog/index.vue @@ -0,0 +1,474 @@ + + + + diff --git a/src/views/tips.vue b/src/views/tips.vue index 5c926775..5b350bd5 100644 --- a/src/views/tips.vue +++ b/src/views/tips.vue @@ -1,5 +1,5 @@