diff --git a/index.html b/index.html index 8bd05f0..b507463 100644 --- a/index.html +++ b/index.html @@ -2,12 +2,17 @@ + diff --git a/manifest.json b/manifest.json index 52cb218..fe3ae3c 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,9 @@ "delay" : 0 }, "modules" : { - "VideoPlayer" : {} + "VideoPlayer" : {}, + "Contacts" : {}, + "Messaging" : {} }, /* 模块配置 */ "distribute" : { @@ -39,7 +41,8 @@ "", "", "", - "" + "", + "" ] }, "ios" : { @@ -67,6 +70,15 @@ }, "vueVersion" : "2", "h5" : { - "template" : "template.html" + "template" : "template.html", + "sdkConfigs" : { + "maps" : { + "amap" : { + "key" : "4799ff37874e604a22b910b44ca948e5", + "securityJsCode" : "", + "serviceHost" : "" + } + } + } } } diff --git a/package-lock.json b/package-lock.json index bb1346d..2c322f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,6 +6,7 @@ "packages": { "": { "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "@escook/request-miniprogram": "^0.2.1", "crypto-js": "^4.2.0", "echarts": "^4.9.0", @@ -14,6 +15,11 @@ "moment": "^2.30.1" } }, + "node_modules/@amap/amap-jsapi-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz", + "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==" + }, "node_modules/@escook/request-miniprogram": { "version": "0.2.1", "resolved": "https://registry.npmmirror.com/@escook/request-miniprogram/-/request-miniprogram-0.2.1.tgz", @@ -66,6 +72,11 @@ } }, "dependencies": { + "@amap/amap-jsapi-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz", + "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==" + }, "@escook/request-miniprogram": { "version": "0.2.1", "resolved": "https://registry.npmmirror.com/@escook/request-miniprogram/-/request-miniprogram-0.2.1.tgz", diff --git a/package.json b/package.json index 3e051f4..547af8c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "@escook/request-miniprogram": "^0.2.1", "crypto-js": "^4.2.0", "echarts": "^4.9.0", diff --git a/pages.json b/pages.json index d819442..b63f3d1 100644 --- a/pages.json +++ b/pages.json @@ -4,16 +4,16 @@ }, "pages": [ { - "path" : "pages/login/login", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "" } }, { - "path" : "pages/rain/rain", - "style" : { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + "path": "pages/rain/rain", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false } }, { @@ -34,6 +34,24 @@ "navigationBarTitleText": "" } }, + { + "path": "pages/xxsb/fromSeverity", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/xxsb/dsfrom", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/xxsb/map", + "style": { + "navigationBarTitleText": "地图示例" + } + }, { "path": "pages/gqzq/index", "style": { @@ -65,118 +83,169 @@ } }, { - "path" : "pages/personInfo/personInfo", + "path": "pages/personInfo/personInfo", "style": { - "navigationBarTitleText" : "" + "navigationBarTitleText": "" } }, { - "path" : "pages/modifyPassword/modifyPassword", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/modifyPassword/modifyPassword", + "style": { + "navigationBarTitleText": "" } }, { - "path" : "pages/forewarning/forewarning", - "style" : { - "navigationBarTitleText" : "" - } + "path": "pages/forewarning/forewarning", + "style": { + "navigationBarTitleText": "" + } }, { - "path" : "pages/forewarning/sh", - "style" : { - "navigationBarTitleText" : "" - } + "path": "pages/forewarning/sh", + "style": { + "navigationBarTitleText": "" + } }, { - "path" : "pages/forewarning/shInformation/shInformation", - "style" : { - "navigationBarTitleText" : "" - } + "path": "pages/forewarning/shInformation/shInformation", + "style": { + "navigationBarTitleText": "" + } }, { - "path" : "pages/addressBook/addressBook", - "style" : { - "navigationBarTitleText" : "" - } + "path": "pages/addressBook/addressBook", + "style": { + "navigationBarTitleText": "" + } }, { - "path" : "pages/water/water", - "style" : { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + "path": "pages/water/water", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false }, "onMessage": "handleMessage" }, { - "path" : "pages/rainDetail/rainDetail", - "style" : { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + "path": "pages/rainDetail/rainDetail", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false } }, { - "path" : "pages/hdDetail/hdDetail", - "style" : { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + "path": "pages/hdDetail/hdDetail", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false } }, { - "path" : "pages/skDetail/skDetail", - "style" : { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + "path": "pages/skDetail/skDetail", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false } }, { - "path" : "pages/addressBook/follow", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/addressBook/follow", + "style": { + "navigationBarTitleText": "" } }, { - "path" : "pages/addressBook/myDept", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/addressBook/myDept", + "style": { + "navigationBarTitleText": "" } }, { - "path" : "pages/orderFeedback/orderFeedback", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/orderFeedback/orderFeedback", + "style": { + "navigationBarTitleText": "" } }, { - "path" : "pages/orderFeedback/orderInformation", - "style" : { - "navigationBarTitleText" : "" + "path": "pages/orderFeedback/orderInformation", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/gqxx/gqxx", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/gqxx/qk", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/gqxx/xq", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/gqxx/qkForm", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/gqxx/xqForm", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/zqxx/zqxx", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/zqxx/table", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/gqzq/zqxx/form", + "style": { + "navigationBarTitleText": "" } } ], + "usingComponents": { + "map": "/uni_modules/@dcloudio/uni-map/components/uni-map/uni-map" + }, "tabBar": { "color": "#333333", - "selectedColor": "#eb4450", + "selectedColor": "#59A7FF", "list": [ - { - "pagePath": "pages/homeIndex/index", - "iconPath": "/static/tabs/home.png", - "selectedIconPath": "static/tabs/home1.png", - "text": "首页" - }, - { - "pagePath": "pages/addressBook/addressBook", - "iconPath": "/static/tabs/my2_icon@2x.png", - "selectedIconPath": "static/tabs/my2_icon@2x.png", - "text": "通讯录" - }, - { - "pagePath": "pages/mypage/mypage", - "iconPath": "/static/images/my1.png", - "selectedIconPath": "static/images/my.png", - "text": "我的" - } + { + "pagePath": "pages/homeIndex/index", + "iconPath": "/static/tabs/home.png", + "selectedIconPath": "static/tabs/home2.png", + "text": "首页" + }, + { + "pagePath": "pages/addressBook/addressBook", + "iconPath": "/static/tabs/phone_icon@2x.png", + "selectedIconPath": "static/tabs/phone_icon@2x2.png", + "text": "通讯录" + }, + { + "pagePath": "pages/mypage/mypage", + "iconPath": "/static/images/my2_icon@2x.png", + "selectedIconPath": "static/images/my2_icon@2x2.png", + "text": "我的" + } ] }, "globalStyle": { @@ -190,21 +259,25 @@ "background": "#efeff4" } }, - "subPackages":[{ - "root": "subpkg", - "pages": [{ - "path": "rainDetail/rainDetail" - }] - }], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8", - "backgroundColorTop":"transparent", - "navigationStyle": "custom", - "app-plus": { - "background": "#efeff4" - } - } + "subPackages": [ + { + "root": "subpkg", + "pages": [ + { + "path": "rainDetail/rainDetail" + } + ] + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "backgroundColorTop": "transparent", + "navigationStyle": "custom", + "app-plus": { + "background": "#efeff4" + } + } } diff --git a/pages/addressBook/addressBook.vue b/pages/addressBook/addressBook.vue index d513eba..7584557 100644 --- a/pages/addressBook/addressBook.vue +++ b/pages/addressBook/addressBook.vue @@ -22,7 +22,7 @@
-
-
+
{{item.userName.slice(0, 1)}}
-
{{item.userName}}
-
{{item.phone}}
+ +
{{item.duty}} @@ -90,22 +91,47 @@ watch: { treePath(newData,oldData){ const last = this.treePath[this.treePath.length-1] - if(last.data.children === null){ - this.getPerson({code:last.code}) + if(this.keyword){ + this.getPerson({code:last.code, name:this.keyword}) }else{ - this.personList = [] + if(last.data.children === null){ + this.getPerson({code:last.code}) + }else{ + this.personList = [] + } } } }, + onShow() { + this.getSearch(this.keyword) + }, methods: { + getHighlight(val) { + const keyword = this.keyword + if (keyword && val.indexOf(keyword) !== -1) { + const text = val.replace(keyword, `${keyword}`) + console.log(text) + return text + } else { + return val + } + }, + highlightKeyword(text, keyword) { + const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => { + return `${match}`; + }); + return highlightedText; + }, getSearch(e) { if(e){ - this.getPerson({name:e}) + const last = this.treePath[this.treePath.length-1] + this.getPerson({name:e, code:last.code}) }else{ const last = this.treePath[this.treePath.length-1] if(last.data.children === null){ this.getPerson({code:last.code}) }else{ + // this.getPerson({code:last.code,name:'不可能查到的值'}) this.personList = [] } } @@ -116,14 +142,15 @@ let url = '/gunshiApp/xfflood/addressbook/list/query' if(name){ //搜索名字 - url = '/gunshiApp/xfflood/addressbook/list/query?args='+name + url = '/gunshiApp/xfflood/addressbook/list/query?args='+name+'&departmentCode='+code }else{ //搜索code url = '/gunshiApp/xfflood/addressbook/list/query?departmentCode='+code } + console.log('查询的url',url) const res = await uni.$http.get(url) this.personList = res.data.data - console.log('查询的人员',res.data.data) + console.log('查询的人员',res) }catch(e){ this.personList = [] //TODO handle the exception @@ -235,6 +262,7 @@ } .breadcrumb_item{ padding: 8px; + padding-right: 0px; font-size: 14px; } .deptItem{ diff --git a/pages/addressBook/follow.vue b/pages/addressBook/follow.vue index fb1a047..de2078d 100644 --- a/pages/addressBook/follow.vue +++ b/pages/addressBook/follow.vue @@ -29,8 +29,8 @@
{{item.userName.slice(0, 1)}}
-
{{item.userName}}
-
{{item.phone}}
+ +
{{item.duty}} @@ -67,6 +67,12 @@ } }, methods: { + highlightKeyword(text, keyword) { + const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => { + return `${match}`; + }); + return highlightedText; + }, async getData () { try { const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/attendee') @@ -90,6 +96,11 @@ uni.$showMsg() } + }, + callNum(num) { + uni.makePhoneCall({ + phoneNumber: num //仅为示例 + }); } }, created() { diff --git a/pages/addressBook/myDept.vue b/pages/addressBook/myDept.vue index 9537db4..6933159 100644 --- a/pages/addressBook/myDept.vue +++ b/pages/addressBook/myDept.vue @@ -22,15 +22,23 @@ v-model="keyword" >
- +
{{item.userName.slice(0, 1)}}
-
{{item.userName}}
-
{{item.phone}}
+ +
{{item.duty}} @@ -54,23 +62,40 @@ data() { return { keyword:'', - list:[] + list:[], + deptList:[] }; }, computed: { getList() { if(this.keyword){ - return [...this.list].filter(o=>o.userName.indexOf(this.keyword)!==-1) + return [...this.list].filter(o=>o.userName.indexOf(this.keyword)!==-1||o.phone.indexOf(this.keyword)!==-1) }else{ return [...this.list] } } }, methods: { + highlightKeyword(text, keyword) { + const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => { + return `${match}`; + }); + return highlightedText; + }, async getData () { try { const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/department') - this.list = res.data.data + console.log('人员信息',res) + this.list = [...res.data.data,...res.data.data,...res.data.data,...res.data.data] + } catch (e) { + uni.$showMsg() + } + }, + async getDept () { + try { + const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/department/super') + console.log('部门信息',res) + this.deptList = res.data.data } catch (e) { uni.$showMsg() } @@ -90,10 +115,16 @@ uni.$showMsg() } - } + }, + callNum(num) { + uni.makePhoneCall({ + phoneNumber: num //仅为示例 + }); + }, }, created() { this.getData() + this.getDept() } } @@ -110,7 +141,7 @@ } .mybody{ background-color: #ffffff; - margin: 5px 5px; + // margin: 5px 5px; padding: 5px 0px; height: calc( 100vh - 100px ); overflow: scroll; @@ -145,4 +176,14 @@ display: flex; justify-content: flex-start } +.breadcrumb{ + padding: 10px; + background-color: #ffffff; + border-bottom: 1px solid #eee; +} +.breadcrumb_item{ + padding: 8px; + padding-right: 0px; + font-size: 14px; +} diff --git a/pages/forewarning/forewarning.vue b/pages/forewarning/forewarning.vue index 3491337..4024425 100644 --- a/pages/forewarning/forewarning.vue +++ b/pages/forewarning/forewarning.vue @@ -24,7 +24,9 @@ itemStyle="height: 44px" > - + + + @@ -41,18 +43,18 @@ tabsOptions:[ { name:'水库预警', - components:uniSk + components:'uniSk' }, { name:'河道预警', - components:uniHd + components:'uniHd' }, { name:'山洪预警', - components:uniSh + components:'uniSh' }, ], - tabsVal:uniSk + tabsVal:'uniSk' }; }, methods: { diff --git a/pages/forewarning/sh.vue b/pages/forewarning/sh.vue index 3d36320..f1661fa 100644 --- a/pages/forewarning/sh.vue +++ b/pages/forewarning/sh.vue @@ -149,7 +149,7 @@ const warngrade = { showStmPicker:false, showEtmPicker:false, searchVal:'', - stm:Number(moment(new Date()).add(-7,'days')), + stm:Number(moment(new Date()).add(-1,'days')), etm:Number(new Date()), check1:['0','30'], check2:['6','5'], @@ -179,7 +179,7 @@ const warngrade = { this.show = false }, reSet() { - this.stm = Number(moment(new Date()).add(-7,'days')) + this.stm = Number(moment(new Date()).add(-1,'days')) this.etm = Number(new Date()) this.check1 = ['0','30'] this.check2 = ['6','5'] diff --git a/pages/gqzq/gqxx/gqxx.vue b/pages/gqzq/gqxx/gqxx.vue new file mode 100644 index 0000000..4de06cb --- /dev/null +++ b/pages/gqzq/gqxx/gqxx.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/pages/gqzq/gqxx/qk.vue b/pages/gqzq/gqxx/qk.vue new file mode 100644 index 0000000..d9ef469 --- /dev/null +++ b/pages/gqzq/gqxx/qk.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/pages/gqzq/gqxx/qkForm.vue b/pages/gqzq/gqxx/qkForm.vue new file mode 100644 index 0000000..24ad300 --- /dev/null +++ b/pages/gqzq/gqxx/qkForm.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/pages/gqzq/gqxx/xq.vue b/pages/gqzq/gqxx/xq.vue new file mode 100644 index 0000000..37be643 --- /dev/null +++ b/pages/gqzq/gqxx/xq.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/pages/gqzq/gqxx/xqForm.vue b/pages/gqzq/gqxx/xqForm.vue new file mode 100644 index 0000000..9db7f89 --- /dev/null +++ b/pages/gqzq/gqxx/xqForm.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/pages/gqzq/index.vue b/pages/gqzq/index.vue index d9f2bbe..47f6e91 100644 --- a/pages/gqzq/index.vue +++ b/pages/gqzq/index.vue @@ -1,18 +1,32 @@