28 files modified
3 files added
| | |
| | | url: '../examine/examine' |
| | | }, |
| | | { |
| | | name: '位置查看', |
| | | name: '保安员位置', |
| | | img: '/static/images/wz.png', |
| | | url: '../map/map' |
| | | } |
| | |
| | | </view> |
| | | <view class="content-wrap"> |
| | | <text class="name">{{Pdata.recipientName}}</text> |
| | | <text class="mess">{{Pdata.postMessage}}</text> |
| | | <text class="mess">{{isJSON(Pdata.postMessage) == true ? '[语音]' : Pdata.postMessage}}</text> |
| | | </view> |
| | | <view class="data-wrap"> |
| | | <text class="data">{{Pdata.postTime}}</text> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | isJSON(str) { |
| | | |
| | | if (typeof str == 'string') { |
| | | try { |
| | | var obj = JSON.parse(str); |
| | | if (typeof obj == 'object' && obj) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | }, |
| | | beginObj() { |
| | | this.bmainb = '3rem'; |
| | | //#ifdef MP-WEIXIN |
| | |
| | | <view class="submit"> |
| | | <view class="submit-chat"> |
| | | <view class="bt-img"> |
| | | <image src="../../static/images/chatroom/voice.png" mode="" @tap="records" /> |
| | | <image :src="audio" mode="" @tap="records" /> |
| | | </view> |
| | | <textarea auto-height="true" class="chat-send btn" :class="{displaynone: isrecord}" @input="inputs" |
| | | v-model="msg" @focus="focus" /> |
| | |
| | | timer: '', |
| | | vlength: 0, |
| | | pageY: 0, |
| | | audio: "../../static/start-audio.png" |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | // 点击切换音频 |
| | | records() { |
| | | if (this.audio == "../../static/start-audio.png") { |
| | | this.audio = "../../static/start-input.png" |
| | | } else { |
| | | this.audio = "../../static/start-audio.png" |
| | | } |
| | | this.isrecord = !this.isrecord |
| | | this.isemoji = false |
| | | this.ismore = false |
| | | |
| | | setTimeout(() => { |
| | | this._getElementHeight() |
| | | }, 10) |
| | | |
| | | }, |
| | | // 点击弹出表情 |
| | | emoji() { |
| | |
| | | }, |
| | | // 发送消息 |
| | | send(msg, type) { |
| | | |
| | | let data = { |
| | | message: msg, |
| | | types: type |
| | | } |
| | | |
| | | this.$emit('inputs', data) |
| | | setTimeout(() => { |
| | | this.msg = '' |
| | |
| | | clearInterval(this.timer) |
| | | recorderManager.stop() |
| | | recorderManager.onStop((res) => { |
| | | console.log(res, 4589) |
| | | let data = { |
| | | voice: res.tempFilePath, |
| | | time: this.vlength |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="NewModuleRootManager"> |
| | | <output url="file://$MODULE_DIR$/bin" /> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | </component> |
| | | </module> |
| | |
| | | |
| | | html, |
| | | body, |
| | | #mapVue { |
| | | #mapVue {.dingwei |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | |
| | | |
| | | .dingwei { |
| | | position: fixed; |
| | | width: 38px; |
| | | height: 38px; |
| | | top: 100px; |
| | | right: 0; |
| | | width: 34px; |
| | | height: 34px; |
| | | right: 10px; |
| | | bottom: 10px; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | border-radius: 20px; |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-08-26 16:22:11 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-08-26 16:22:11 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-08-28 15:03:25 |
| | | */ |
| | | var me = new Vue({ |
| | | el: '#mapVue', |
| | |
| | | |
| | | this.userId = this.GetQueryString('userid') |
| | | |
| | | axios.get('http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '¤t=1&size=999999').then((res) => { |
| | | var deptid = this.GetQueryString('deptid') |
| | | |
| | | var roleName = this.GetQueryChinese('roleName') |
| | | |
| | | console.log(roleName) |
| | | |
| | | var url = '' |
| | | |
| | | if (roleName == '保安公司管理员') { |
| | | |
| | | url = 'http://223.82.109.183:2080/api/blade-user/pages?¤t=1&size=999999&deptId=' + deptid |
| | | |
| | | } else { |
| | | |
| | | url = 'http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '¤t=1&size=999999' |
| | | |
| | | } |
| | | |
| | | axios.get(url).then((res) => { |
| | | |
| | | if (res.data.data.records.length > 0) { |
| | | res.data.data.records.forEach(item => { |
| | |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | }, |
| | | GetQueryChinese(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return decodeURI(r[2]); |
| | | return null; |
| | | }, |
| | | beginMap(map, data) { |
| | | var that = this, |
| | | center = [28.708432053474827, 115.85883507433789]; |
| | |
| | | { |
| | | "path": "pages/message/addMessage", |
| | | "style": { |
| | | "navigationBarTitleText": "新增通知通告", |
| | | "navigationBarTitleText": "发送通知", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | |
| | | }, { |
| | | "path": "pages/map/map", |
| | | "style": { |
| | | "navigationBarTitleText": "位置查看", |
| | | "navigationBarTitleText": "保安员位置", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | |
| | | |
| | | <span class="header-title">调度指令</span> |
| | | |
| | | <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff"> |
| | | <u-icon v-if="$store.state.UserData.rname[0].indexOf('保安') == -1" @click="goToAddPage" top='4' |
| | | class="header-add" name="plus" color="#fff"> |
| | | </u-icon> |
| | | |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | |
| | | list: [{ |
| | | name: '发送指令' |
| | | }, |
| | | { |
| | | name: '接收指令' |
| | | } |
| | | ], |
| | | list: [], |
| | | |
| | | current: 0, |
| | | |
| | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安') { |
| | | |
| | | this.list = [{ |
| | | name: '接收指令查询' |
| | | }] |
| | | |
| | | this.getSend(); |
| | | |
| | | } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | this.list = [{ |
| | | name: '接收指令查询' |
| | | }] |
| | | |
| | | this.getSend(); |
| | | |
| | | } else { |
| | | this.list = [{ |
| | | name: '下发指令查询' |
| | | }, { |
| | | name: '接收指令查询' |
| | | }] |
| | | |
| | | this.getReceive() |
| | | } |
| | | |
| | | }, |
| | | onReachBottom() { |
| | |
| | | |
| | | }, |
| | | mounted() { |
| | | this.getReceive(); |
| | | }, |
| | | methods: { |
| | | getReceive() { |
| | |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state |
| | | url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state |
| | | .puserID, |
| | | method: "get", |
| | | data: { |
| | |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state.puserID, |
| | | url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state.puserID, |
| | | method: "get", |
| | | data: { |
| | | current: that.pagelist, |
| | |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | |
| | | if (this.pullDown == true) { |
| | | this.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 3px; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class='initiae-box'> |
| | | |
| | | <view class="group-chat-box"> |
| | | |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | | <u-form-item label-width='132' prop="content" label="指令内容" :required="true"> |
| | | <u-input type='textarea' v-model="form.content" placeholder="请输入指令内容" /> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item label-width='158' prop="recipientText" label="指令接收人" :required="true"> |
| | | |
| | | <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false" |
| | | @click="recipientClick" /> |
| | | <u-select v-model="recipientShow" mode="mutil-column-auto" :list="recipientList" |
| | | @confirm="recipientConfirm"> |
| | | </u-select> |
| | | |
| | | |
| | | <u-button slot="right" type="success" size="mini" @click="recipientClick">选择接收人</u-button> |
| | | |
| | | <u-popup :closeable="true" v-model="recipientShow" mode="bottom" height="50%" border-radius="14"> |
| | | |
| | | <view> |
| | | |
| | | <u-checkbox-group v-show="recipientList.length > 0" @change="checkboxGroupChange" |
| | | :wrap='true' :size="40"> |
| | | |
| | | <u-checkbox v-model="item.checked" v-for="(item, index) in recipientList" :key="index" |
| | | :name="item.id" shape="circle" |
| | | style="padding: 0 40rpx; height: 92rpx; position: relative; box-sizing: border-box;"> |
| | | |
| | | <view style="margin-left: 22rpx"> |
| | | {{item.real_name}} |
| | | </view> |
| | | |
| | | </u-checkbox> |
| | | |
| | | </u-checkbox-group> |
| | | |
| | | <view style=" height: 92rpx; padding: 0 40rpx;" v-show="recipientList.length == 0"> |
| | | |
| | | 暂无数据 |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </u-popup> |
| | | |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="指令相关图片" class='imgissue-upload'> |
| | |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view> |
| | | <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="establish-box"> |
| | | |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送</u-button> |
| | | |
| | | </view> |
| | | |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | form: { |
| | | content: '', |
| | | recipient: '', |
| | | recipientText: '' |
| | | recipientData: [] |
| | | }, |
| | | rules: { |
| | | |
| | |
| | | message: '指令内容不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | recipientText: [{ |
| | | required: true, |
| | | message: '请选择接收人', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | | }, |
| | | imgs: [], |
| | | }; |
| | |
| | | methods: { |
| | | recipientClick() { |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?userId=" + this.$store |
| | | .state |
| | | .UserData.user_id, |
| | | url: this.$store.state.piAPI + "/blade-user/seleL", |
| | | method: "get", |
| | | data: { |
| | | |
| | | type: 1, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | }, |
| | | success: (res) => { |
| | | this.recipientList = [] |
| | | res.data.forEach(item => { |
| | | if (item.hasChildren) { |
| | | |
| | | res.data.data.forEach(item => { |
| | | |
| | | if (item.id != this.$store.state |
| | | .UserData.user_id |
| | | ) { |
| | | item.checked = false; |
| | | this.recipientList.push(item) |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.recipientShow = true; |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | recipientConfirm(e) { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.recipient = e[0].value |
| | | this.form.recipientText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.recipient = e[2].value |
| | | this.form.recipientText = e[2].label |
| | | } |
| | | |
| | | }, |
| | | |
| | | initiateClick() { |
| | | var imgurl = ''; |
| | | this.imgs.forEach((item, index) => { |
| | |
| | | }) |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | |
| | | if (this.form.recipientData.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: '请最少选择一个接收人', |
| | | }) |
| | | return |
| | | } |
| | | |
| | | var str = ''; |
| | | |
| | | this.form.recipientData.forEach(item => { |
| | | str += item + ',' |
| | | }) |
| | | |
| | | str = str.substr(0, str.length - 1); |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/saveDirectiveAndFile", |
| | | method: "post", |
| | | data: { |
| | | // 接收 |
| | | receiveDirectiveIds: this.form.recipient, |
| | | receiveDirectiveIds: str, |
| | | // 发送 |
| | | sendDirectiveId: this.$store.state |
| | | .UserData.user_id, |
| | |
| | | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | | if (res.data.msg.indexOf('成功') != -1) { |
| | | this.$refs.uToast.show({ |
| | | title: '指令下发成功', |
| | | type: 'success', |
| | | url: '/pages/home/home' |
| | | url: '/pages/dispatch/dispatch' |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | }); |
| | | }, |
| | | checkboxGroupChange(e) { |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .initiae-box { |
| | | padding: 0 30rpx; |
| | | .submit { |
| | | border: none; |
| | | width: 94%; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | color: #ffffff; |
| | | font-size: 38rpx; |
| | | |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .establish-box { |
| | | position: relative; |
| | | height: 116rpx; |
| | | background: #fff; |
| | | text-align: center; |
| | | |
| | | uni-button { |
| | | margin: 0; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class='initiae-box'> |
| | | <view class="group-chat-box"> |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | | <u-form-item label-width='132' label="检查人"> |
| | |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view> |
| | | <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="establish-box"> |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | methods: { |
| | | |
| | | peopleClick() { |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=1", |
| | | url: this.$store.state.piAPI + "/blade-user/seleL", |
| | | method: "get", |
| | | data: { |
| | | |
| | | type: 1, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | }, |
| | | success: (res) => { |
| | | this.peopleList = [] |
| | | res.data.forEach(item => { |
| | | if (item.hasChildren == true) { |
| | | |
| | | res.data.data.forEach(item => { |
| | | |
| | | if (item.id != this.$store.state |
| | | .UserData.user_id |
| | | ) { |
| | | |
| | | item.value = item.cardid |
| | | |
| | | item.label = item.real_name |
| | | |
| | | this.peopleList.push(item) |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | this.peopleShow = true; |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | |
| | | peopleConfirm(e) { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.people = e[0].value |
| | | this.form.peopleText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.people = e[1].value |
| | | this.form.peopleText = e[1].label |
| | | this.form.unitText = e[0].label |
| | | } else if (e.length == 3) { |
| | | this.form.people = e[2].value |
| | | this.form.peopleText = e[2].label |
| | | this.form.unitText = e[1].label |
| | | } |
| | | |
| | | this.form.people = e[0].value |
| | | this.form.peopleText = e[0].label |
| | | }, |
| | | |
| | | getCurrentTime() { |
| | |
| | | imgurl += item.src + ',' |
| | | } |
| | | }) |
| | | |
| | | var carid = '' |
| | | |
| | | console.log(this.peopleList) |
| | | |
| | | this.peopleList.forEach(item => { |
| | | |
| | | item.children.forEach(it => { |
| | | if (it.value == this.form.people) { |
| | | carid == it.idCardNo |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | uni.request({ |
| | |
| | | deptname: this.createData.deptName, |
| | | realname: this.form.peopleText, |
| | | sname: this.form.unitText, |
| | | carid: carid, |
| | | carid: this.form.people, |
| | | reviewtime: this.getCurrentTime(), |
| | | insid: this.form.content, |
| | | examinationType: this.form.outcome, |
| | | url: imgurl |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | | if (res.data.msg.indexOf('成功') != -1) { |
| | | this.$refs.uToast.show({ |
| | | title: '新增人员检查成功', |
| | | type: 'success', |
| | |
| | | sizeType: ['compressed', 'original'], //上传压缩图,原图 |
| | | sourceType: ['album', 'camera'], //从相册选择或从使用相机 |
| | | success: async (res) => { |
| | | |
| | | for (var i = 0; i < res.tempFiles.length; i++) { |
| | | if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制 |
| | | uni.showToast({ |
| | |
| | | return |
| | | } |
| | | } |
| | | |
| | | var tempFilePath = res.tempFilePaths; |
| | | // try { |
| | | uni.showLoading({ |
| | |
| | | 'user': 'test' // 上传附带参数 |
| | | }, |
| | | success: (data) => { |
| | | console.log(data, JSON.parse(data.data).data) |
| | | |
| | | function isJSON_test(str) { |
| | | if (typeof str == 'string') { |
| | | try { |
| | | var obj = JSON.parse(str); |
| | | return obj.data; |
| | | } catch (e) { |
| | | return str; |
| | | } |
| | | } |
| | | console.log('It is not a string!') |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: '上传图片成功!', |
| | | duration: 1000 |
| | | }); |
| | | |
| | | // 根据接口具体返回格式 赋值具体对应url |
| | | that.imgs.push({ |
| | | id: i, |
| | | src: JSON.parse(data.data).data |
| | | src: isJSON_test(data.data) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .initiae-box { |
| | | padding: 0 30rpx; |
| | | .submit { |
| | | border: none; |
| | | width: 94%; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | color: #ffffff; |
| | | font-size: 38rpx; |
| | | |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .establish-box { |
| | | position: relative; |
| | | height: 116rpx; |
| | | background: #fff; |
| | | text-align: center; |
| | | |
| | | uni-button { |
| | | margin: 0; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class='initiae-box'> |
| | | <view class="group-chat-box"> |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | | <u-form-item label-width='132' label="检查人"> |
| | |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view> |
| | | <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </view> |
| | | <view class="establish-box"> |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | methods: { |
| | | |
| | | unitClick() { |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=1", |
| | | url: this.$store.state.piAPI + "/blade-system/dept/security_lazy-tree", |
| | | method: "get", |
| | | data: { |
| | | |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | }, |
| | | success: (res) => { |
| | | |
| | | this.unitList = [] |
| | | res.data.forEach(item => { |
| | | if (item.hasChildren == true) { |
| | | this.unitList.push(item) |
| | | } |
| | | |
| | | res.data.data.forEach(item => { |
| | | var data = {} |
| | | |
| | | data.value = item.id |
| | | |
| | | data.label = item.title |
| | | |
| | | this.unitList.push(data) |
| | | }) |
| | | |
| | | this.unitShow = true; |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | |
| | | unitConfirm(e) { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.unit = e[0].value |
| | | this.form.unitText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.unit = e[1].value |
| | | this.form.unitText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.unit = e[2].value |
| | | this.form.unitText = e[2].label |
| | | } |
| | | |
| | | this.form.unit = e[0].value |
| | | this.form.unitText = e[0].label |
| | | |
| | | }, |
| | | |
| | |
| | | url: imgurl |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | | if (res.data.msg.indexOf('成功') != -1) { |
| | | this.$refs.uToast.show({ |
| | | title: '新增单位检查成功', |
| | | type: 'success', |
| | |
| | | sizeType: ['compressed', 'original'], //上传压缩图,原图 |
| | | sourceType: ['album', 'camera'], //从相册选择或从使用相机 |
| | | success: async (res) => { |
| | | |
| | | for (var i = 0; i < res.tempFiles.length; i++) { |
| | | if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制 |
| | | uni.showToast({ |
| | |
| | | return |
| | | } |
| | | } |
| | | |
| | | var tempFilePath = res.tempFilePaths; |
| | | // try { |
| | | uni.showLoading({ |
| | | title: "上传中...", |
| | | mask: true |
| | | }) |
| | | |
| | | var that = this; |
| | | |
| | | // 循环调用uni.uploadFile ,因微信小程序只支持单文件上传 |
| | | for (var i = 0; i < tempFilePath.length; i++) { |
| | | uni.uploadFile({ |
| | |
| | | 'user': 'test' // 上传附带参数 |
| | | }, |
| | | success: (data) => { |
| | | console.log(data, JSON.parse(data.data).data) |
| | | |
| | | function isJSON_test(str) { |
| | | if (typeof str == 'string') { |
| | | try { |
| | | var obj = JSON.parse(str); |
| | | return obj.data; |
| | | } catch (e) { |
| | | return str; |
| | | } |
| | | } |
| | | console.log('It is not a string!') |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: '上传图片成功!', |
| | | duration: 1000 |
| | | }); |
| | | |
| | | // 根据接口具体返回格式 赋值具体对应url |
| | | that.imgs.push({ |
| | | id: i, |
| | | src: JSON.parse(data.data).data |
| | | src: isJSON_test(data.data) |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .initiae-box { |
| | | padding: 0 30rpx; |
| | | .submit { |
| | | border: none; |
| | | width: 94%; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | color: #ffffff; |
| | | font-size: 38rpx; |
| | | |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .establish-box { |
| | | position: relative; |
| | | height: 116rpx; |
| | | background: #fff; |
| | | text-align: center; |
| | | |
| | | uni-button { |
| | | margin: 0; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | |
| | | <span class="header-title">现场检查</span> |
| | | |
| | | <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff"> |
| | | <u-icon v-if="$store.state.UserData.rname[0].indexOf('保安') == -1" @click="goToAddPage" top='4' |
| | | class="header-add" name="plus" color="#fff"> |
| | | </u-icon> |
| | | |
| | | </view> |
| | |
| | | return { |
| | | |
| | | list: [{ |
| | | name: '保安检查' |
| | | name: '保安员检查列表' |
| | | }, |
| | | { |
| | | name: '单位检查' |
| | | name: '单位检查列表' |
| | | } |
| | | ], |
| | | |
| | |
| | | url: this.$store.state.piAPI + "/seinspect/list", |
| | | method: "get", |
| | | data: { |
| | | deptId: this.$store.state.UserData |
| | | .dept_id, |
| | | current: that.pagelist, |
| | | size: 10 |
| | | }, |
| | |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 3px; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | |
| | | <template> |
| | | <view class="container"> |
| | | |
| | | |
| | | <!-- 头部 --> |
| | | <u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true" |
| | | :title="recName" back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff"> |
| | | <u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true" :title="recName" |
| | | back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff"> |
| | | |
| | | <view slot='right'> |
| | | <u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28"></u-icon> |
| | | <u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28"> |
| | | </u-icon> |
| | | </view> |
| | | </u-navbar> |
| | | |
| | | |
| | | |
| | | <scroll-view id="chatingBox" :style="{ height: swiperHeight + 'px' }" scroll-y="true" class="chat" scroll-with-animation="isanimation" :scroll-into-view="scrollToView" |
| | | @scrolltoupper="nextPage"> |
| | | <scroll-view id="chatingBox" :style="{ height: swiperHeight + 'px' }" scroll-y="true" class="chat" |
| | | scroll-with-animation="isanimation" :scroll-into-view="scrollToView" @scrolltoupper="nextPage"> |
| | | <view class="chat-main" :style="{paddingBottom:inputh + 'px'}"> |
| | | <view class="loading" :class="{displaynone:isload}"> |
| | | <image src="@/static/images/chatroom/load.png" mode="" class="loading-img" |
| | |
| | | </view> |
| | | <!-- voice --> |
| | | <view class="message" v-if="item.messageType == 2"> |
| | | <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 'px'}" |
| | | @tap="playVoice(item.postMessage.voice)"> |
| | | <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}" |
| | | @tap="playVoice(item.postMessage)"> |
| | | |
| | | <image src="../../static/images/chatroom/sound.png" mode="" class="voice-img" /> |
| | | {{ item.postMessage.time }} " |
| | | {{ item.postMessage.time }}" |
| | | |
| | | </view> |
| | | </view> |
| | | <!-- location --> |
| | |
| | | </view> |
| | | <!-- voice --> |
| | | <view class="message" v-if="item.messageType == 2"> |
| | | <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 'px'}" |
| | | @tap="playVoice(item.postMessage.voice)"> |
| | | {{ item.postMessage.time }} " |
| | | <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}" |
| | | @tap="playVoice(item.postMessage)"> |
| | | {{ item.postMessage.time }}" |
| | | <image src="@/static/images/chatroom/sound.png" mode="" class="voice-img" /> |
| | | </view> |
| | | </view> |
| | |
| | | import filter from '@/config/filter.js' |
| | | import submit from '@/components/submit/submit.vue' |
| | | import WxStorage from "../../static/lib/wxStorage.js" |
| | | const innerAudioContext = uni.createInnerAudioContext() |
| | | |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | isanimation: true, |
| | | begainloading: true, |
| | | |
| | | name: [] //视频 双方id |
| | | name: [], //视频 双方id |
| | | innerAudioContext: uni.createInnerAudioContext() |
| | | }; |
| | | }, |
| | | components: { |
| | |
| | | this.recipientId = option.chatID; |
| | | this._getMsg(this.nowpage) |
| | | // this.nextPage() |
| | | var data = JSON.parse(option.data) |
| | | var data = option.data |
| | | |
| | | if (this.isJSON(option.data) == true) { |
| | | data = JSON.parse(option.data) |
| | | } |
| | | |
| | | |
| | | console.log(data, 55555555555555555555555) |
| | | this.name = ['wo', option.chatID]; |
| | | // console.log(data) |
| | |
| | | } else { |
| | | this.callName = data.recipientName; |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | onReady() { |
| | | let that = this; |
| | | uni.getSystemInfo({ |
| | | success(e) { |
| | | console.log(e); |
| | | // console.log(e); |
| | | let { |
| | | windowWidth, |
| | | windowHeight, |
| | |
| | | query |
| | | .select('#chatingBox') |
| | | .boundingClientRect(data => { |
| | | |
| | | |
| | | that.swiperHeight = (safeArea.bottom - data.top); |
| | | |
| | | |
| | | }) |
| | | .exec(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | chatMessageDetail() { |
| | | |
| | | }, |
| | | |
| | | // 返回键 |
| | | backOne() { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | |
| | | // 滚动顶部加载上一页 |
| | | nextPage() { |
| | | // if(this.nowpage > 0 && this.begainloading) { |
| | |
| | | var resdata = res.data.data.user; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if (resdata[i].avatar == null || resdata[i].avatar == "") { |
| | | resdata[i].avatar = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191109%2F1d3d4d82715444c4b8284f65e3feed10.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632484198&t=1f4086a5894cbf83b311fa37c276405c"; |
| | | resdata[i].avatar = |
| | | "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191109%2F1d3d4d82715444c4b8284f65e3feed10.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632484198&t=1f4086a5894cbf83b311fa37c276405c"; |
| | | } |
| | | |
| | | if (resdata[i].id == that.senId) { |
| | |
| | | msg[i].message = '../../static/images/index/friend-list/' + msg[i].message |
| | | that.imgMsg.unshift(msg[i].message) |
| | | } |
| | | |
| | | if (that.isJSON(msg[i].postMessage) == true) { |
| | | msg[i].postMessage = JSON.parse(msg[i].postMessage) |
| | | } |
| | | |
| | | that.msgs.unshift(msg[i]) |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | isJSON(str) { |
| | | |
| | | if (typeof str == 'string') { |
| | | try { |
| | | var obj = JSON.parse(str); |
| | | if (typeof obj == 'object' && obj) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | // 预览图片 |
| | | previewImage(e) { |
| | | |
| | |
| | | longPressActions: { |
| | | itemList: ['发送给朋友', '保存图片', '收藏'], |
| | | success: function(data) { |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | // console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | | // console.log(err.errMsg); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 音频播放 |
| | | playVoice(e) { |
| | | console.log('ok') |
| | | innerAudioContext.src = e |
| | | console.log(e, 'ok') |
| | | |
| | | var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext() |
| | | // innerAudioContext.autoplay = false |
| | | innerAudioContext.src = e.voice |
| | | innerAudioContext.play() |
| | | |
| | | setTimeout(() => { |
| | | innerAudioContext.destroy() |
| | | }, e.time * 1000) |
| | | |
| | | }, |
| | | // 接收输入内容 |
| | | inputs(e) { |
| | | |
| | | console.log(e, 999) |
| | | |
| | | var that = this; |
| | | this.isanimation = true |
| | | let len = this.msgs.length - 1 |
| | |
| | | senderId: that.senId, |
| | | recipientId: that.recipientId, |
| | | postMessage: e.message, |
| | | messageType: 0, |
| | | messageType: e.types, |
| | | status: 0, |
| | | postTime: nowTime, |
| | | } |
| | | |
| | | var mesagess = null; |
| | | |
| | | if (e.message instanceof Object) { |
| | | mesagess = JSON.stringify(e.message) |
| | | } else { |
| | | mesagess = e.message |
| | | } |
| | | |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/chat-records/insertSingleChat", |
| | |
| | | data: { |
| | | senderId: that.senId, |
| | | recipientId: that.recipientId, |
| | | postMessage: e.message, |
| | | messageType: 0, |
| | | postMessage: mesagess, |
| | | messageType: e.types, |
| | | status: 0, |
| | | postTime: sentTime, |
| | | }, |
| | | success: (res) => { |
| | | |
| | | console.log(res, 89898) |
| | | |
| | | } |
| | | }); |
| | |
| | | name: e.name, |
| | | address: e.address, |
| | | success: () => { |
| | | console.log('success') |
| | | // console.log('success') |
| | | } |
| | | }) |
| | | }, |
| | |
| | | height: auto; |
| | | margin-right: 35rpx; |
| | | } |
| | | |
| | | |
| | | .chat { |
| | | height: 100%; |
| | | |
| | |
| | | font-size: $uni-font-size-lg; |
| | | color: $uni-text-color; |
| | | line-height: 44rpx; |
| | | padding: 18rpx 34rpx; |
| | | padding: 18rpx 20rpx; |
| | | } |
| | | |
| | | .msg-img { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | |
| | | }, |
| | | onShow() { |
| | | this.beginObj(); |
| | | this.getdataList(0); |
| | | |
| | | }, |
| | | onPageScroll(e) { |
| | | this.rect = e.scrollTop |
| | |
| | | <template> |
| | | <view class="registerUser"> |
| | | |
| | | <view class="group-chat-box"> |
| | | <view class="group-chat-box" id="groupChatBox" :style="{ height: swiperHeight + 'px' }"> |
| | | |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | |
| | | groupnotice: '', |
| | | groupmember: '', |
| | | }, |
| | | swiperHeight: 0 |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | let that = this; |
| | | uni.getSystemInfo({ |
| | | success(e) { |
| | | console.log(e); |
| | | let { |
| | | windowWidth, |
| | | windowHeight, |
| | | safeArea |
| | | } = e; |
| | | const query = uni.createSelectorQuery().in(that); |
| | | query |
| | | .select('#groupChatBox') |
| | | .boundingClientRect(data => { |
| | | |
| | | that.swiperHeight = (safeArea.bottom - 58); |
| | | |
| | | }) |
| | | .exec(); |
| | | } |
| | | }); |
| | | }, |
| | | onLoad() { |
| | | this.getFriend(); |
| | |
| | | } |
| | | |
| | | .registerUser { |
| | | height: 100%; |
| | | background: #f7f7f7; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 1.2rem; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | |
| | | {{ position }} |
| | | <u-icon name="arrow-down" class="arrow" size="18" color="#C9C9C9"></u-icon> |
| | | </picker> --> |
| | | |
| | | |
| | | <!-- <image src="/static/images/rider.png" class="rider" mode="widthFix" v-if="!focus"></image> |
| | | |
| | | <view class="search-input" v-else> |
| | |
| | | </view> --> |
| | | |
| | | <view class="tool"> |
| | | <!-- <image src="/static/images/home/search.png" class="icon search-icon" mode="widthFix" |
| | | <!-- <image src="/static/images/home/search.png" class="icon search-icon" mode="widthFix" |
| | | @click="handleFocus" v-if="!focus"></image> --> |
| | | <image src="/static/images/home/message.png" class="icon message-icon" mode="widthFix"></image> |
| | | <!-- <image src="/static/images/home/qr.png" class="icon qr-icon" mode="widthFix"></image> --> |
| | |
| | | <!-- 服务按钮 end --> |
| | | |
| | | <!-- 新闻模块 start --> |
| | | <view class="news" style="display: none;"> |
| | | <navigator hover-class="none" url="/pages/news/list" class="cell"> |
| | | <view class="ctitle">通知公告</view> |
| | | <view class="more"> |
| | | <view class="news"> |
| | | |
| | | <navigator hover-class="none" url="/pages/news/listsss" class="cell"> |
| | | <view class="ctitle">通知通告</view> |
| | | <view hover-class="bg-light" class="more" @click="goArticle()"> |
| | | 更多 |
| | | <u-icon name="arrow-right" color="#A6ABB5" size="16"></u-icon> |
| | | </view> |
| | | </navigator> |
| | | |
| | | <view class="news-list"> |
| | | <navigator url="/pages/news/detail" hover-class="none" class="news-item" |
| | | <view hover-class="none" class="news-item" @click="goArticleDetail(item)" |
| | | v-for="(item, index) in newsList" :key="index"> |
| | | <view class="left"> |
| | | <view class="info"> |
| | | [火灾防范] 严禁在建筑内的共用走道、楼梯间、安全出口处等公共区域停放电动车或者为电动车充电。 |
| | | {{item.title}} |
| | | </view> |
| | | |
| | | <view class="new-content u-line-1" v-html="item.content"> |
| | | |
| | | </view> |
| | | <view class="date"> |
| | | <image src="/static/images/home/date.png" class="icon" mode=""></image> |
| | | 2021.06.17 |
| | | <!-- <image src="/static/images/home/date.png" class="icon" mode=""></image> --> |
| | | <view class="advisory-title-name">{{item.category == 1 ? '单位公告' : '公安公告'}}</view> |
| | | <view class="advisory-title-time">{{item.releaseTime}}</view> |
| | | </view> |
| | | </view> |
| | | <image src="" mode="" class="img"></image> |
| | | </navigator> |
| | | </view> |
| | | <u-loadmore :status="status" /> |
| | | </view> |
| | | |
| | | <!-- 新闻模块 end --> |
| | | </view> |
| | | <!-- <u-button class="ccbut" type="primary" @click="openVideo('Mains')">测试点视频通话:主播</u-button> |
| | | |
| | | <!-- <u-button class="ccbut" type="primary" @click="openVideo('Mains')">测试点视频通话:主播</u-button> |
| | | <u-button class="ccbut" type="primary" @click="openVideo('Receiver')">测试点视频通话:第二个</u-button> --> |
| | | </view> |
| | | </template> |
| | |
| | | positionArr: [], |
| | | status: 'loadmore', |
| | | list: 15, |
| | | page: 0, |
| | | |
| | | keyword: '', |
| | | focus: false, |
| | | bannerList: [], |
| | | noticeList: [], |
| | | newsList: [{}, {}], |
| | | page: 1, |
| | | pagesize: 2, |
| | | newsList: [], |
| | | navButton: [], |
| | | serviceButton: [] |
| | | }; |
| | |
| | | // uni.connectSocket({ |
| | | // url: 'ws://192.168.0.111:9034/websocket' |
| | | // }); |
| | | |
| | | |
| | | // uni.onSocketOpen(function(res) { |
| | | // socketOpen = true; |
| | | // sendSocketMessage(); |
| | | // }); |
| | | |
| | | |
| | | // function sendSocketMessage() { |
| | | // var data = { |
| | | // type: 'my', |
| | |
| | | // }); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | // uni.onSocketMessage(function(res) { |
| | | // console.log('收到服务器内容:' + res.data); |
| | | // }); |
| | | |
| | | |
| | | }, |
| | | onLoad() { |
| | | |
| | | |
| | | }, |
| | | onShow() { |
| | | |
| | | this.serviceButton = [] |
| | | |
| | | // 后续将改为与后端联动 |
| | | // 加载banner数据 |
| | | fakePosition().then(data => { |
| | |
| | | }); |
| | | // 加载服务按钮数据 |
| | | fakeServiceButton().then(data => { |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安') { |
| | | |
| | | data.forEach((item, index) => { |
| | | if (item.name == '保安单位') { |
| | | data.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | data.forEach((item, index) => { |
| | | if (item.name == '保安管理') { |
| | | data.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | data.forEach((item, index) => { |
| | | if (item.name == '保安员位置') { |
| | | data.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | data.forEach((item, index) => { |
| | | if (item.name == '现场检查') { |
| | | data.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | data.forEach(item => { |
| | | if (item.name == '保安单位') { |
| | | data.splice(0, 1) |
| | | } |
| | | }) |
| | | |
| | | data.forEach((item, index) => { |
| | | if (item.name == '现场检查') { |
| | | data.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | this.serviceButton = data; |
| | | |
| | | }); |
| | | |
| | | this.page = 1 |
| | | this.pagesize = 2 |
| | | this.newsList = [] |
| | | |
| | | //获取新闻信息 |
| | | this.getArtcilePageList(); |
| | | |
| | | }, |
| | | onReachBottom() { |
| | | // 后续将改为与后端联动 |
| | | if (this.page >= 3) return; |
| | | this.status = 'loading'; |
| | | if (this.status == 'nomore') return; |
| | | this.page = ++this.page; |
| | | setTimeout(() => { |
| | | this.list += 10; |
| | | if (this.page >= 3) this.status = 'nomore'; |
| | | else this.status = 'loading'; |
| | | this.newsList.push(...[{}, {}]); |
| | | this.getArtcilePageList(); |
| | | }, 2000); |
| | | }, |
| | | methods: { |
| | | openVideo(val){ |
| | | //点击更多跳转资讯页 |
| | | goArticle() { |
| | | uni.navigateTo({ |
| | | // url: '../videoCall/videoCall?state=' + val + '&type=video' |
| | | url: '../message/message' |
| | | }) |
| | | }, |
| | | //去跳转详情页面 |
| | | goArticleDetail(item) { |
| | | |
| | | console.log(item) |
| | | |
| | | if (item.content != undefined && item.content.indexOf('<p>') != -1) { |
| | | |
| | | var reg1 = /<\/?p[^>]*>/g; |
| | | |
| | | item.content = item.content.replace(reg1, ''); |
| | | |
| | | var reg2 = /[ ]/g; |
| | | |
| | | item.content = item.content.replace(reg2, ''); |
| | | |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: '../message/messageDetail?detailData=' + JSON.stringify(item) |
| | | }); |
| | | |
| | | }, |
| | | openVideo(val) { |
| | | uni.navigateTo({ |
| | | // url: '../videoCall/videoCall?state=' + val + '&type=video' |
| | | url: '../videoCall/videoCall?state=Mains&type=video&myname=wo&toname=1424647828935819265' |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | handleSearchBlur() { |
| | | this.focus = false; |
| | | }, |
| | | //获取资讯信息 |
| | | getArtcilePageList() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this.$store.state |
| | | .UserData |
| | | .dept_id, |
| | | method: 'GET', |
| | | data: { |
| | | type: 1, |
| | | current: this.page, |
| | | size: this.pagesize |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 200) { |
| | | if (res.data.data.records) { |
| | | |
| | | //如果总数小于pageSize,不做其他操作 |
| | | if (res.data.data.total < this.pagesize) { |
| | | that.newsList = res.data.data.records; |
| | | } else { |
| | | if (res.data.data.records.length < this.pagesize) { |
| | | //如果数量小于分页数量,则为最后一页 |
| | | this.status = 'nomore' |
| | | } else { |
| | | //如果数量小于分页数量,则为最后一页 |
| | | this.status = 'loading'; |
| | | } |
| | | res.data.data.records.forEach(item => { |
| | | console.log(item); |
| | | that.newsList.push(item); |
| | | }) |
| | | } |
| | | } |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | |
| | | justify-content: space-between; |
| | | |
| | | .left { |
| | | flex: 1; |
| | | width: 100%; |
| | | height: 160rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | |
| | | font-size: 28rpx; |
| | | font-family: PingFang SC; |
| | | font-weight: 500; |
| | | font-weight: 550; |
| | | color: #585b61; |
| | | line-height: 36rpx; |
| | | letter-spacing: 1px; |
| | | } |
| | | |
| | | .new-content { |
| | | margin: 12rpx 0; |
| | | font-size: 0.46rem; |
| | | color: #4d4d4d; |
| | | } |
| | | |
| | | .date { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | .icon { |
| | |
| | | font-family: PingFang SC; |
| | | font-weight: 500; |
| | | color: #a6abb5; |
| | | |
| | | |
| | | .advisory-title-name { |
| | | font-size: 0.7rem; |
| | | letter-spacing: 1px; |
| | | } |
| | | |
| | | .advisory-title-time { |
| | | // margin-left: 0.8rem; |
| | | font-size: 0.7rem; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .img { |
| | | flex-shrink: 0; |
| | | width: 252rpx; |
| | | height: 160rpx; |
| | | width: 232rpx; |
| | | height: 140rpx; |
| | | border-radius: 20rpx; |
| | | background-color: #82848a; |
| | | margin-left: 0.5rem; |
| | | } |
| | | } |
| | | } |
| | |
| | | if (this.OURpass == true) { |
| | | // this.passwords = '******'; |
| | | uni.hideNavigationBarLoading(); |
| | | uni.reLaunch({ |
| | | url: '../home/home' |
| | | uni.redirectTo({ |
| | | url: '/pages/home/home' |
| | | }) |
| | | return '成功登录' |
| | | } else { |
| | |
| | | return { |
| | | swiperHeight: 0, |
| | | |
| | | gridList: [{ |
| | | name: '通知通告', |
| | | gridList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安') { |
| | | |
| | | |
| | | this.gridList = [{ |
| | | name: '发送通知', |
| | | img: '/static/images/manage/g8.png', |
| | | url: '/pages/message/addMessage' |
| | | }, |
| | | { |
| | | name: '工作汇报添加', |
| | | img: '/static/images/manage/g11.png', |
| | | url: '/pages/report/initiate' |
| | | } |
| | | ] |
| | | |
| | | } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | this.gridList = [{ |
| | | name: '发送通知', |
| | | img: '/static/images/manage/g8.png', |
| | | url: '/pages/message/addMessage' |
| | | }, |
| | | { |
| | | name: '工作汇报添加', |
| | | img: '/static/images/manage/g11.png', |
| | | url: '/pages/report/initiate' |
| | | }, |
| | | { |
| | | name: '保安员位置', |
| | | img: '/static/images/manage/g12.png', |
| | | url: '/pages/map/map' |
| | | }, |
| | | ] |
| | | |
| | | } else { |
| | | |
| | | this.gridList = [{ |
| | | name: '发送通知', |
| | | img: '/static/images/manage/g8.png', |
| | | url: '/pages/message/addMessage' |
| | | }, |
| | |
| | | { |
| | | name: '指令下发', |
| | | img: '/static/images/manage/g10.png', |
| | | url: '/pages/dispatch/dispatch' |
| | | url: '/pages/dispatch/imgissue' |
| | | }, |
| | | { |
| | | name: '工作汇报', |
| | | name: '工作汇报添加', |
| | | img: '/static/images/manage/g11.png', |
| | | url: '/pages/report/initiate' |
| | | }, |
| | | { |
| | | name: '位置查看', |
| | | name: '保安员位置', |
| | | img: '/static/images/manage/g12.png', |
| | | url: '/pages/map/map' |
| | | }, |
| | | ] |
| | | }; |
| | | |
| | | } |
| | | |
| | | }, |
| | | onReady() { |
| | | let that = this; |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <web-view :src="urls"></web-view> |
| | | <view class="content" style="width: 100%; height: 100%;"> |
| | | |
| | | <!-- <u-loading size="66" :show="flag" mode="circle"></u-loading> --> |
| | | |
| | | <view v-show="flag" class="loading">{{loadingText}}</view> |
| | | |
| | | <view v-show="!flag"> |
| | | |
| | | <web-view :src="urls" style="width: 100%; height: 100%;"></web-view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | urls: '', |
| | | flag: true, |
| | | loadingText: '加载中...' |
| | | // dataList: [], |
| | | } |
| | | }, |
| | | methods: {}, |
| | | mounted() {}, |
| | | mounted() { |
| | | // uni.showNavigationBarLoading(); |
| | | |
| | | this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction + |
| | | "&userid=" + this.$store.state.UserData.user_id + |
| | | "&roleName=" + this.$store.state.UserData.rname[0] + |
| | | "&deptid=" + this.$store.state.UserData.dept_id; |
| | | |
| | | |
| | | setTimeout(() => { |
| | | // uni.hideNavigationBarLoading(); |
| | | this.flag = false |
| | | }, 3000) |
| | | |
| | | }, |
| | | onLoad: function(options) { |
| | | |
| | | |
| | | this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id; |
| | | |
| | | |
| | | // this.urls = "http://127.0.0.1:5500/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction + |
| | | // "&userid=" + this.$store.state.UserData.role_id; |
| | | // "&userid=" + this.$store.state.UserData.user_id; |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .loading { |
| | | text-align: center; |
| | | line-height: 80px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class='initiae-box'> |
| | | |
| | | <view class="group-chat-box"> |
| | | |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | | <u-form-item label-width='132' prop="title" label="通知标题" :required="true"> |
| | |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view> |
| | | <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="establish-box"> |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送 |
| | | </u-button> |
| | | </view> |
| | | |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-system/dept/detail", |
| | | method: "get", |
| | |
| | | success: (result) => { |
| | | |
| | | var deptCategory = result.data.data.deptCategory; |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-desk/notice/submit", |
| | | method: "post", |
| | | data: { |
| | | title: this.form.title, |
| | | content: this.form.content, |
| | | category: deptCategory, |
| | | deptId: result.data.data.deptCategory, |
| | | releaseTime: this.getCurrentTime(), |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | | this.$refs.uToast.show({ |
| | | title: '新增通知成功', |
| | | type: 'success', |
| | | url: '/pages/message/message' |
| | | }) |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-desk/notice/submit", |
| | | method: "post", |
| | | data: { |
| | | type: 1, |
| | | title: this.form.title, |
| | | content: this.form.content, |
| | | category: deptCategory, |
| | | deptId: this.createData.dept_id, |
| | | releaseTime: this.getCurrentTime(), |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | | this.$refs.uToast.show({ |
| | | title: '新增通知成功', |
| | | type: 'success', |
| | | url: '/pages/message/message' |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | console.log('验证失败'); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .initiae-box { |
| | | padding: 0 30rpx; |
| | | .submit { |
| | | border: none; |
| | | width: 94%; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | color: #ffffff; |
| | | font-size: 38rpx; |
| | | |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .establish-box { |
| | | position: relative; |
| | | height: 116rpx; |
| | | background: #fff; |
| | | text-align: center; |
| | | |
| | | uni-button { |
| | | margin: 0; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | |
| | | <span class="header-title">通知公告</span> |
| | | |
| | | <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff"> |
| | | <u-icon v-if="$store.state.UserData.rname[0] != '保安'" @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff"> |
| | | </u-icon> |
| | | |
| | | </view> |
| | |
| | | return { |
| | | |
| | | list: [{ |
| | | name: '单位公告' |
| | | name: '单位通知列表' |
| | | }, |
| | | { |
| | | name: '公安公告' |
| | | name: '公安通知列表' |
| | | } |
| | | ], |
| | | |
| | |
| | | .dept_id, |
| | | method: "get", |
| | | data: { |
| | | type: 1, |
| | | current: that.pagelist, |
| | | size: 10 |
| | | }, |
| | |
| | | .dept_id, |
| | | method: "get", |
| | | data: { |
| | | type: 1, |
| | | current: that.pagelist, |
| | | size: 10 |
| | | }, |
| | |
| | | .dept_id, |
| | | method: "get", |
| | | data: { |
| | | type: 1, |
| | | current: 1, |
| | | size: 999999, |
| | | title: str |
| | |
| | | .dept_id, |
| | | method: "get", |
| | | data: { |
| | | type: 1, |
| | | current: 1, |
| | | size: 999999, |
| | | title: str |
| | |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 3px; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class='initiae-box'> |
| | | |
| | | <view class="group-chat-box"> |
| | | |
| | | <u-form :model="form" ref="uForm"> |
| | | |
| | | <u-form-item label-width='132' prop="categoryText" label="汇报类别" :required="true"> |
| | |
| | | <u-input type='textarea' v-model="form.content" placeholder="请输入汇报内容" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' prop="recipientText" label="接收人" :required="true"> |
| | | <u-form-item label-width='132' label="接收人"> |
| | | |
| | | <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false" |
| | | @click="recipientClick" /> |
| | | <u-select v-model="recipientShow" mode="mutil-column-auto" :list="recipientList" |
| | | @confirm="recipientConfirm"> |
| | | </u-select> |
| | | <u-button slot="right" type="success" size="mini" @click="recipientClick">选择接收人</u-button> |
| | | |
| | | <u-popup :closeable="true" v-model="recipientShow" mode="bottom" height="50%" border-radius="14"> |
| | | |
| | | <view> |
| | | |
| | | <u-checkbox-group v-show="recipientList.length > 0" @change="checkboxGroupChange" :wrap='true' :size="40"> |
| | | |
| | | <u-checkbox v-model="item.checked" v-for="(item, index) in recipientList" :key="index" |
| | | :name="item.id" shape="circle" |
| | | style="padding: 0 40rpx; height: 92rpx; position: relative; box-sizing: border-box;"> |
| | | |
| | | <view style="margin-left: 22rpx"> |
| | | {{item.real_name}} |
| | | </view> |
| | | |
| | | </u-checkbox> |
| | | |
| | | </u-checkbox-group> |
| | | |
| | | <view style=" height: 92rpx; padding: 0 40rpx;" v-show="recipientList.length == 0"> |
| | | |
| | | 暂无数据 |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </u-popup> |
| | | |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view> |
| | | <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button> |
| | | </view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="establish-box"> |
| | | |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送</u-button> |
| | | |
| | | </view> |
| | | |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | recipientShow: false, |
| | | |
| | | |
| | | categoryList: [{ |
| | | value: '1', |
| | | label: '保安向保安汇报' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '保安向民警汇报' |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '民警向民警汇报' |
| | | } |
| | | ], |
| | | categoryList: [], |
| | | typeList: [{ |
| | | value: '1', |
| | | label: '日报' |
| | |
| | | categoryText: '', |
| | | type: '', |
| | | typeText: '', |
| | | recipient: '', |
| | | recipientText: '' |
| | | recipientData: [] |
| | | }, |
| | | rules: { |
| | | categoryText: [{ |
| | |
| | | message: '汇报内容不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | recipientText: [{ |
| | | required: true, |
| | | message: '请选择接收人', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | } |
| | | }, |
| | | peopleSelect: false, |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安') { |
| | | |
| | | this.categoryList = [{ |
| | | value: '1', |
| | | label: '保安向保安汇报' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '保安向民警汇报' |
| | | } |
| | | ] |
| | | |
| | | } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | this.categoryList = [{ |
| | | value: '1', |
| | | label: '保安向保安汇报' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '保安向民警汇报' |
| | | } |
| | | ] |
| | | |
| | | } else { |
| | | this.categoryList = [{ |
| | | value: '3', |
| | | label: '民警向民警汇报' |
| | | }] |
| | | } |
| | | |
| | | }, |
| | | onReady() { |
| | | |
| | | this.$refs.uForm.setRules(this.rules); |
| | | |
| | | }, |
| | | methods: { |
| | | categoryClick() { |
| | |
| | | }); |
| | | return; |
| | | } else { |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=" + this.form |
| | | .category, |
| | | method: "get", |
| | | data: { |
| | | |
| | | }, |
| | | success: (res) => { |
| | | this.recipientList = [] |
| | | res.data.forEach(item => { |
| | | if (item.hasChildren) { |
| | | this.recipientList.push(item) |
| | | } |
| | | }) |
| | | this.recipientShow = true; |
| | | if (this.peopleSelect == false) { |
| | | var data = null; |
| | | if (this.form |
| | | .category == 1) { |
| | | |
| | | data = { |
| | | type: 2, |
| | | deptid: this.$store.state.UserData.dept_id |
| | | } |
| | | |
| | | } else if (this.form |
| | | .category == 2) { |
| | | |
| | | data = { |
| | | type: 3, |
| | | deptid: this.$store.state.UserData.dept_id, |
| | | userId: this.$store.state.UserData.user_id |
| | | } |
| | | |
| | | } else if (this.form |
| | | .category == 3) { |
| | | |
| | | data = { |
| | | type: 4, |
| | | deptid: this.$store.state.UserData.dept_id |
| | | // jurisdiction: this.$store.state |
| | | // .UserData.jurisdiction, |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-user/seleL", |
| | | method: "get", |
| | | data: data, |
| | | success: (res) => { |
| | | |
| | | this.recipientList = [] |
| | | res.data.data.forEach(item => { |
| | | |
| | | if (item.id != this.$store.state |
| | | .UserData.user_id |
| | | ) { |
| | | |
| | | item.checked = false; |
| | | this.recipientList.push(item) |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.recipientShow = true; |
| | | |
| | | this.peopleSelect = true; |
| | | |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | |
| | | this.recipientShow = true; |
| | | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | categoryConfirm(e) { |
| | | if (this.form.categoryText != e[0].label) { |
| | | this.form.recipient = '' |
| | | this.form.recipientText = '' |
| | | if (this.form.categoryText == e[0].label) { |
| | | return; |
| | | } else { |
| | | this.form.category = e[0].value |
| | | this.form.categoryText = e[0].label |
| | | this.peopleSelect = false |
| | | } |
| | | |
| | | this.form.category = e[0].value |
| | | this.form.categoryText = e[0].label |
| | | |
| | | }, |
| | | typeConfirm(e) { |
| | | this.form.type = e[0].value |
| | | this.form.typeText = e[0].label |
| | | }, |
| | | recipientConfirm(e) { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.recipient = e[0].value |
| | | this.form.recipientText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.recipient = e[2].value |
| | | this.form.recipientText = e[2].label |
| | | } |
| | | |
| | | }, |
| | | |
| | | initiateClick() { |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | |
| | | if (this.form.recipientData.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: '请最少选择一个接收人', |
| | | }) |
| | | return |
| | | } |
| | | |
| | | var str = ''; |
| | | |
| | | this.form.recipientData.forEach(item => { |
| | | str += item + ',' |
| | | }) |
| | | |
| | | str = str.substr(0, str.length - 1); |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/workReport/submit", |
| | | method: "post", |
| | |
| | | content: this.form.content, |
| | | userId: this.$store.state.puserID, |
| | | deptId: this.$store.state.UserData.dept_id, |
| | | receivedIds: this.form.recipient |
| | | receivedIds: str |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg == "操作成功") { |
| | |
| | | console.log('验证失败'); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | checkboxGroupChange(e) { |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .initiae-box { |
| | | padding: 0 30rpx; |
| | | .submit { |
| | | border: none; |
| | | width: 94%; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | color: #ffffff; |
| | | font-size: 38rpx; |
| | | |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | |
| | | .group-chat-box { |
| | | height: calc(100% - 116rpx); |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .establish-box { |
| | | position: relative; |
| | | height: 116rpx; |
| | | background: #fff; |
| | | text-align: center; |
| | | |
| | | uni-button { |
| | | margin: 0; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | return { |
| | | |
| | | list: [{ |
| | | name: '接收汇报' |
| | | name: '汇报接收列表' |
| | | }, |
| | | { |
| | | name: '发送汇报' |
| | | name: '汇报发送列表' |
| | | } |
| | | ], |
| | | |
| | |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | |
| | | if (that.pullDown == true) { |
| | | that.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | |
| | | if (that.pullDown == true) { |
| | | that.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | |
| | | return |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }); |
| | |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 3px; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | |
| | | return |
| | | } |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | dispatch: 0, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | current: that.pagelist, |
| | | size: 10 |
| | | }, |
| | | success: (res) => { |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | if (this.pullDown == true) { |
| | | this.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | current: that.pagelist, |
| | | size: 10, |
| | | deptId: this.$store.state.UserData.dept_id, |
| | | roleAlias: 111 |
| | | }, |
| | | success: (res) => { |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | if (this.pullDown == true) { |
| | | this.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | | |
| | | if (resdata.length == 0) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } else { |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | that.dataList.push(item) |
| | | }) |
| | | } |
| | | |
| | | if (that.pagelist == that.pages) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | |
| | | } |
| | | |
| | | if (resdata.length == 0) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } else { |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | that.dataList.push(item) |
| | | }) |
| | | }); |
| | | |
| | | } else { |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | dispatch: 0, |
| | | status: 1, |
| | | roleAlias: 111, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | current: that.pagelist, |
| | | size: 10 |
| | | }, |
| | | success: (res) => { |
| | | that.pages = res.data.data.pages; |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | if (this.pullDown == true) { |
| | | this.pullDown = false; |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | | |
| | | if (resdata.length == 0) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } else { |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | that.dataList.push(item) |
| | | }) |
| | | } |
| | | |
| | | if (that.pagelist == that.pages) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | |
| | | } |
| | | |
| | | if (that.pagelist == that.pages) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | goDetail(item) { |
| | | uni.navigateTo({ |
| | |
| | | return |
| | | } else { |
| | | that.newsList = []; |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | realName: str, |
| | | dispatch: 0, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | }, |
| | | success: (res) => { |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | if (this.$store.state.UserData.rname[0] == '保安公司管理员') { |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | realName: str, |
| | | deptId: this.$store.state.UserData.dept_id, |
| | | roleAlias: 111 |
| | | }, |
| | | success: (res) => { |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/blade-user/pages", |
| | | method: "get", |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | realName: str, |
| | | dispatch: 0, |
| | | jurisdiction: this.$store.state |
| | | .UserData.jurisdiction, |
| | | }, |
| | | success: (res) => { |
| | | |
| | | var resdata = res.data.data.records; |
| | | |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | } |
| | |
| | | <view class="once"> |
| | | 编号:<view class="o-once"> {{datalist.baoanzheng}}</view> |
| | | </view> |
| | | <view class="once" style="margin-bottom: 1rem; display: flex;"> |
| | | <view style='flex: 1'>发证机关:<view class="o-once"> {{datalist.fzobj}}</view> |
| | | </view> |
| | | <view style='flex: 1'>发证日期:<view class="o-once">{{datalist.fztime}}</view> |
| | | </view> |
| | | <view class="once"> |
| | | 发证机关:<view class="o-once"> {{datalist.fzobj}}</view> |
| | | </view> |
| | | <view class="once"> |
| | | 发证日期:<view class="o-once"> {{datalist.fztime}}</view> |
| | | </view> |
| | | |
| | | <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar"> |
| | | <view slot="error" style="font-size: 1rem;">暂无证件</view> |
| | | </u-image> |
| | |
| | | } |
| | | |
| | | .certificatesnj { |
| | | padding: 0.6rem 1.6rem 1.6rem 1.6rem; |
| | | background-image: url(../../static/images/salf/bazbj.png); |
| | | background-size: 100% 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .certificates { |
| | | |
| | | |
| | | .img { |
| | | position: absolute; |
| | |
| | | .once { |
| | | width: 100%; |
| | | height: auto; |
| | | line-height: 2rem; |
| | | font-size: 0.8rem; |
| | | padding: 0 2.5% 0 2.5%; |
| | | line-height: 1.6rem; |
| | | font-size: 0.72rem; |
| | | |
| | | .o-once { |
| | | display: inline-block; |
| | | font-size: 0.72rem; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | } |
| | |
| | | <image src="/static/images/user/n2.png" class="icon" mode=""></image> |
| | | <view class="name">我的待办</view> |
| | | </navigator> --> |
| | | <navigator url="" hover-class="none" class="nav-item"> |
| | | <view hover-class="none" class="nav-item" @click="openMap"> |
| | | <image src="/static/images/user/n3.png" class="icon" mode=""></image> |
| | | <view class="name">我的地址</view> |
| | | </navigator> |
| | | </view> |
| | | |
| | | <!-- <navigator url="" hover-class="none" class="nav-item"> |
| | | <image src="/static/images/user/n4.png" class="icon" mode=""></image> |
| | | <view class="name">我的收藏</view> |
| | |
| | | getOneselfInFo() { |
| | | var that = this; |
| | | //保安信息查询 |
| | | console.log(this.$store.state.UserData) |
| | | console.log(this.$store.state.UserData, 999) |
| | | if (this.$store.state.UserData) { |
| | | that.name = this.$store.state.UserData.nick_name |
| | | that.id = this.$store.state.UserData.user_id |
| | |
| | | |
| | | } |
| | | }, |
| | | // 地图 |
| | | openMap(){ |
| | | uni.getLocation({ |
| | | type: 'gcj02', //返回可以用于uni.openLocation的经纬度 |
| | | success: function (res) { |
| | | console.log(res) |
| | | const latitude = res.latitude; |
| | | const longitude = res.longitude; |
| | | uni.openLocation({ |
| | | latitude: latitude, |
| | | longitude: longitude, |
| | | success: function () { |
| | | console.log('success'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log(this.$store.state) |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward" title="个人资料" |
| | | back-icon-size="35" :background="{ background: '#fff' }" title-color="#000"> |
| | | <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-color="#fff" title="个人资料" |
| | | back-icon-size="35" :background="{ background: '#0BB9C8' }" title-color="#fff"> |
| | | <view class="complie" slot="right" @click="submit">完成</view> |
| | | </u-navbar> |
| | | |
| | | <view class="content"> |
| | | <view class="avatar"> |
| | | <view class="avatar" style="height: 420rpx"> |
| | | <image :src="detail.avatar" class="avatar-image" mode=""></image> |
| | | <view class="a" @click="handleChooseImg">更换头像</view> |
| | | </view> |
| | | <view class="form"> |
| | | <view class="cell"> |
| | | <view class="name">姓名</view> |
| | | <input type="text" placeholder="请输入姓名" v-model="detail.nick_name" class="ipt" |
| | | placeholder-class="hold" /> |
| | | |
| | | <view class="detail-content"> |
| | | |
| | | <view class='row-content'> |
| | | <span class="title"> |
| | | 名 称 |
| | | </span> |
| | | <span> |
| | | {{detail.nick_name}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content'> |
| | | <span class="title"> |
| | | 单 位 |
| | | </span> |
| | | <span> |
| | | {{detail.deptName}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content' v-show="detail.rname[0] == '保安'"> |
| | | <span class="title"> |
| | | 性 别 |
| | | </span> |
| | | <span> |
| | | {{detail.list.sex == 1 ? '男' : detail.list.sex == 2 ? '女' : ''}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content' v-show="detail.rname[0] == '保安'"> |
| | | <span class="title"> |
| | | 年 龄 |
| | | </span> |
| | | <span> |
| | | {{detail.age}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content' v-show="detail.rname[0] == '保安'"> |
| | | <span class="title"> |
| | | 籍 贯 |
| | | </span> |
| | | <span> |
| | | {{detail.list.nativeplace}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content' v-show="detail.rname[0] == '保安'"> |
| | | <span class="title"> |
| | | 联系电话 |
| | | </span> |
| | | <span> |
| | | {{detail.list.phone}} |
| | | </span> |
| | | </view> |
| | | |
| | | <view class='row-content' v-show="detail.rname[0] == '保安'"> |
| | | <span class="title"> |
| | | 证件编号 |
| | | </span> |
| | | <span> |
| | | {{detail.list.securitynumber}} |
| | | </span> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <!-- --> |
| | | <view class="back" @click="logout">退出登录</view> |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | <!-- <view class="back" @click="logout">退出登录</view> --> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | .UserData) { |
| | | this.detail = this.$store.state |
| | | .UserData |
| | | |
| | | var usercode = this.detail.cardid; |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var birthday_year = parseInt(usercode.substr(6, 4)); |
| | | var userage = year - birthday_year; |
| | | |
| | | this.detail.age = userage; |
| | | } |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | logout() { |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | changeDefaultPicker(name, e) { |
| | | this.detail[name] = e.detail.value; |
| | |
| | | |
| | | <style lang="scss"> |
| | | .container { |
| | | background-color: #f7f7f7; |
| | | min-height: 100vh; |
| | | padding: 0 0 200rpx; |
| | | |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | |
| | | background: #0ED2F7; |
| | | /* fallback for old browsers */ |
| | | background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7); |
| | | /* Chrome 10-25, Safari 5.1-6 */ |
| | | background: linear-gradient(to left, #B2FEFA, #0ED2F7); |
| | | /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | .complie { |
| | |
| | | font-size: 32rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 400; |
| | | color: #14b9c8; |
| | | color: #fff; |
| | | } |
| | | |
| | | .content { |
| | | background-color: #ffffff; |
| | | overflow: hidden; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .avatar { |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | |
| | | font-size: 30rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 400; |
| | | color: #14b9c8; |
| | | color: #fff; |
| | | |
| | | background: #0BB9C8; |
| | | /* fallback for old browsers */ |
| | | background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); |
| | | /* Chrome 10-25, Safari 5.1-6 */ |
| | | background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); |
| | | /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ |
| | | |
| | | .avatar-image { |
| | | width: 162rpx; |
| | |
| | | } |
| | | } |
| | | |
| | | .form { |
| | | padding: 0 36rpx; |
| | | .detail-content { |
| | | margin-top: 8px; |
| | | margin-left: 2.5%; |
| | | padding: 8px 2.5%; |
| | | width: 95%; |
| | | background-color: rgba(65, 64, 66, 0.1); |
| | | border-radius: 5px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | min-height: calc(100% - 634rpx); |
| | | |
| | | .cell { |
| | | .row-content { |
| | | width: 100%; |
| | | height: 60px; |
| | | /* background-color: seashell; */ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 40rpx 0; |
| | | /* justify-content: center; */ |
| | | color: #fff; |
| | | margin: 0 auto; |
| | | border-bottom: 1px solid rgba(255, 255, 255, 0.5); |
| | | |
| | | font-size: 30rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: bold; |
| | | color: #666666; |
| | | |
| | | &:not(:last-of-type) { |
| | | border-bottom: 2rpx solid #efefef; |
| | | } |
| | | |
| | | .ipt { |
| | | flex: 1; |
| | | margin-left: 40rpx; |
| | | text-align: right; |
| | | font-size: 23rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: bold; |
| | | color: #333333; |
| | | } |
| | | |
| | | .hold { |
| | | font-size: 27rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: bold; |
| | | color: #c8c8ce; |
| | | .title { |
| | | margin-left: 6%; |
| | | display: inline-block; |
| | | width: 21%; |
| | | min-width: 144rpx; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .back { |
| | | margin-top: 40rpx; |
| | | text-align: center; |
| | |
| | | logPath: '', |
| | | piAPI: 'http://223.82.109.183:2080/api', |
| | | api: 'http://223.82.109.183:2080/api', |
| | | // piAPI: 'http://localhost:81/', |
| | | // piAPI: 'http://192.168.0.103:81', |
| | | // piAPI: 'http://localhost:83/', |
| | | // piAPI: 'http://192.168.0.115:83', |
| | | puserName: '', |
| | | puserID: '', |
| | | puserIphone: '', |
| | |
| | | }) |
| | | vm.$u.vuex('accessToken', '') |
| | | vm.$u.vuex('isLogin', false) |
| | | vm.$u.vuex('UserData', {}) |
| | | uni.redirectTo({ |
| | | url: '/pages/login/login-account' |
| | | }) |