31 files modified
10 files added
1 files deleted
| New file |
| | |
| | | // 获取服务按钮数据 |
| | | export function fakeServiceButton() { |
| | | return new Promise((resolute, reject) => { |
| | | try { |
| | | const list = [{ |
| | | name: '下发指令查询', |
| | | img: '/static/images/dispatch/up-down.png', |
| | | url: '../dispatch/send' |
| | | }, |
| | | { |
| | | name: '接收指令查询', |
| | | img: '/static/images/dispatch/look.png', |
| | | url: '../dispatch/receive' |
| | | }, |
| | | { |
| | | name: '文字指令下发', |
| | | img: '/static/images/dispatch/issue.png', |
| | | url: '../dispatch/text' |
| | | }, |
| | | { |
| | | name: '图片指令下发', |
| | | img: '/static/images/dispatch/imgissue.png', |
| | | url: '../dispatch/imgissue' |
| | | } |
| | | ]; |
| | | resolute(list); |
| | | } catch (e) { |
| | | //模拟接口请求失败 |
| | | reject(e); |
| | | } |
| | | }) |
| | | } |
| | |
| | | { |
| | | name: '调度指令', |
| | | img: '/static/images/home/s11.png', |
| | | url: '../dispatch/dispatch' |
| | | url: '../dispatch/index' |
| | | }, |
| | | { |
| | | name: '通知通告', |
| | |
| | | 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/securityStaff/information", |
| | | "style": { |
| | | "navigationBarTitleText": "详细信息", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | "navigationBarTitleText": "个人信息", |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | |
| | | { |
| | | "path": "pages/company/companyDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "保安单位管理", |
| | | "navigationBarTitleText": "单位保安员统计", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/dispatch", |
| | | "path": "pages/dispatch/index", |
| | | "style": { |
| | | "navigationBarTitleText": "调度指令", |
| | | "enablePullDownRefresh": true, |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationStyle": "custom" |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/send", |
| | | "style": { |
| | | "navigationBarTitleText": "下发指令查询", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/receive", |
| | | "style": { |
| | | "navigationBarTitleText": "接收指令查询", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/text", |
| | | "style": { |
| | | "navigationBarTitleText": "文字指令下发", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/imgissue", |
| | | "style": { |
| | | "navigationBarTitleText": "图片指令下发", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatch/imgissue", |
| | | "style": { |
| | | "navigationBarTitleText": "指令下发", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | |
| | | { |
| | | "path": "pages/message/message", |
| | | "style": { |
| | |
| | | { |
| | | "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" |
| | |
| | | <template> |
| | | <view class="container"> |
| | | |
| | | <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959" |
| | | height="100" @change="change"></u-tabs> |
| | | <u-form :model="detailData" ref="uForm" class="companyForm"> |
| | | |
| | | <view v-show="current == 0"> |
| | | <u-form-item label-width='132' label="单位名称"> |
| | | <span> {{ detailData.enterprisename }} </span> |
| | | </u-form-item> |
| | | |
| | | <view style=" |
| | | <u-form-item label-width='132' label="成立日期"> |
| | | <span> {{ detailData.establishtime }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='158' label="法定代表人"> |
| | | <span> {{ detailData.representative }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='266' label="法定代表人联系方式"> |
| | | <span> {{ detailData.representativecell }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='98' label="联系人"> |
| | | <span> {{ detailData.contacts }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='152' label="联系人电话"> |
| | | <span> {{ detailData.contactscell }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="注册资本"> |
| | | <span> {{ detailData.registeredcapital }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="实缴资本"> |
| | | <span> {{ detailData.capital }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="注册地址"> |
| | | <span> {{ detailData.address }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="经营范围"> |
| | | <span> {{ detailData.business }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="所属地区"> |
| | | <span> {{ detailData.region }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="登记机关"> |
| | | <span> {{ detailData.registration }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="所属行业"> |
| | | <span> {{ detailData.industry }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='158' label="工商注册号"> |
| | | <span> {{ detailData.registrationnumber }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="组织机构代码"> |
| | | <span> {{ detailData.organizationcode }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="纳税人识别号"> |
| | | <span> {{ detailData.identificationnumber }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='236' label="统一社会信用代码"> |
| | | <span> {{ detailData.creditcode }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="营业执照"> |
| | | <img style="width: calc(100%)" :src="detailData.businessLicense" alt=""> |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | |
| | | <view style=" |
| | | width: 100%; |
| | | height:500rpx; |
| | | margin-top: 30rpx;"> |
| | | |
| | | <l-echart ref="chart"></l-echart> |
| | | |
| | | </view> |
| | | |
| | | <view style=" |
| | | width: 100%; |
| | | height:500rpx; |
| | | margin-top: 30rpx;"> |
| | | |
| | | <l-echart ref="certificateEchart"></l-echart> |
| | | |
| | | </view> |
| | | <l-echart ref="chart"></l-echart> |
| | | |
| | | </view> |
| | | |
| | | <view v-show="current == 1"> |
| | | <view style=" |
| | | width: 100%; |
| | | height:500rpx; |
| | | margin-top: 30rpx;"> |
| | | |
| | | <u-form :model="detailData" ref="uForm" class="companyForm"> |
| | | |
| | | <u-form-item label-width='132' label="单位名称"> |
| | | <span> {{ detailData.enterprisename }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="成立日期"> |
| | | <span> {{ detailData.establishtime }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='158' label="法定代表人"> |
| | | <span> {{ detailData.representative }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='266' label="法定代表人联系方式"> |
| | | <span> {{ detailData.representativecell }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='98' label="联系人"> |
| | | <span> {{ detailData.contacts }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='152' label="联系人电话"> |
| | | <span> {{ detailData.contactscell }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="注册资本"> |
| | | <span> {{ detailData.registeredcapital }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="实缴资本"> |
| | | <span> {{ detailData.capital }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="注册地址"> |
| | | <span> {{ detailData.address }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="经营范围"> |
| | | <span> {{ detailData.business }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="所属地区"> |
| | | <span> {{ detailData.region }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="登记机关"> |
| | | <span> {{ detailData.registration }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="所属行业"> |
| | | <span> {{ detailData.industry }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='158' label="工商注册号"> |
| | | <span> {{ detailData.registrationnumber }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="组织机构代码"> |
| | | <span> {{ detailData.organizationcode }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="纳税人识别号"> |
| | | <span> {{ detailData.identificationnumber }} </span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='236' label="统一社会信用代码"> |
| | | <span> {{ detailData.creditcode }} </span> |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <l-echart ref="certificateEchart"></l-echart> |
| | | |
| | | </view> |
| | | |
| | |
| | | <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-input type='textarea' v-model="form.recipientPeople" placeholder="请选择指令接收人" |
| | | @click="recipientClick" autoHeight /> |
| | | |
| | | <!-- <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> |
| | | |
| | |
| | | return { |
| | | recipientShow: false, |
| | | recipientList: [], |
| | | |
| | | form: { |
| | | content: '', |
| | | recipient: '', |
| | | recipientText: '' |
| | | recipientData: [], |
| | | recipientPeople: '' |
| | | }, |
| | | rules: { |
| | | |
| | |
| | | message: '指令内容不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | recipientText: [{ |
| | | required: true, |
| | | message: '请选择接收人', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | | }, |
| | | imgs: [], |
| | | }; |
| | |
| | | }, |
| | | methods: { |
| | | recipientClick() { |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientShow = true; |
| | | return; |
| | | } |
| | | |
| | | 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) { |
| | | this.recipientList.push(item) |
| | | |
| | | res.data.data.forEach(item => { |
| | | var flag = true |
| | | |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientList.forEach(it => { |
| | | if (item.id == it.id) flag = false |
| | | }) |
| | | } |
| | | |
| | | if (flag == true) { |
| | | 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) { |
| | | var that = this |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | var str = "" |
| | | var num = 0 |
| | | |
| | | that.form.recipientData.forEach((item, index) => { |
| | | that.recipientList.forEach((it, index) => { |
| | | if (item == it.id) { |
| | | if (num > 0) { |
| | | str += '、'; |
| | | str += it.real_name; |
| | | } else { |
| | | str += it.real_name |
| | | } |
| | | num += 1 |
| | | return |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | this.form.recipientPeople = str |
| | | |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </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> |
| New file |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class="service-box"> |
| | | <u-grid :col="3" :border="false"> |
| | | <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index" |
| | | @click="goBusinessPage(item.url,index)"> |
| | | <view class="service-item"> |
| | | <image :src="item.img" mode="widthFix" class="img"></image> |
| | | <view class="name">{{ item.name }}</view> |
| | | </view> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | fakeServiceButton |
| | | } from "@/api/mock/dispatch.js"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataList: [], |
| | | serviceButton: [] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | onLoad() { |
| | | // 加载服务按钮数据 |
| | | fakeServiceButton().then(data => { |
| | | this.serviceButton = data; |
| | | }); |
| | | }, |
| | | //页面跳转 |
| | | goBusinessPage(url, index) { |
| | | uni.navigateTo({ |
| | | url: url |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .container { |
| | | background-color: #f7f7f7; |
| | | min-height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .service-box { |
| | | background: #ffffff; |
| | | border-radius: 20px 20px 20px 20px; |
| | | margin: 30rpx 20rpx 0; |
| | | padding: 0rpx 20rpx; |
| | | |
| | | .service-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | width: 100%; |
| | | height: 120rpx; |
| | | font-size: 26rpx; |
| | | font-family: PingFang SC; |
| | | font-weight: 500; |
| | | color: #585b61; |
| | | |
| | | .img { |
| | | width: 70rpx; |
| | | height: auto; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <span>{{ detailData.sendTime }}</span> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='184' label="指令相关图片"> |
| | | <u-form-item v-show="detailData.url.length > 0" label-width='184' label="指令相关图片"> |
| | | <img :src="detailData.url" alt=""> |
| | | </u-form-item> |
| | | |
| New file |
| | |
| | | <template> |
| | | |
| | | <view class="page-container" style="height: 100%; position: relative;"> |
| | | |
| | | <view class="wrapper"> |
| | | |
| | | <view class="body"> |
| | | |
| | | <view class="body-content"> |
| | | |
| | | <u-search v-model='keyValue' placeholder='请输入指令内容' shape="round" class="u-search" |
| | | input-align="center" height="70" @search='searchValue' @custom='searchValue' @clear='clearValue' |
| | | @change='changeValue'> |
| | | </u-search> |
| | | |
| | | <view v-show="newsList.length > 0"> |
| | | <view class="inTmain" v-for="(item,index) in newsList"> |
| | | <u-card :title="item.content" @click="goDetail(item)"> |
| | | <view class="" slot="body"> |
| | | <view> |
| | | <view style="margin-bottom: 10px;" class="u-body-item-title u-line-2"> |
| | | 发送指令人:{{item.sendName}}</view> |
| | | </view> |
| | | <view> |
| | | <view class="u-body-item-title u-line-2">接受指令人:{{item.receiveName}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="" slot="foot"> |
| | | </u-icon>发送指令时间:{{item.sendTime}}</view> |
| | | </u-card> |
| | | </view> |
| | | <u-loadmore class='msg' :status="status" /> |
| | | </view> |
| | | |
| | | <view class="msg" v-show='newsList.length == 0'> |
| | | 暂无数据 |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | dataList: [], |
| | | newsList: [], |
| | | |
| | | status: 'loadmore', |
| | | keyValue: '', |
| | | |
| | | dataList: [], |
| | | newsList: [], |
| | | pagelist: 0, |
| | | pages: 0, |
| | | flag: true, |
| | | |
| | | pullDown: false |
| | | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getSend(); |
| | | |
| | | }, |
| | | onReachBottom() { |
| | | var that = this; |
| | | |
| | | if (that.flag == false) { |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | // 后续将改为与后端联动 |
| | | that.status = 'loading'; |
| | | |
| | | setTimeout(() => { |
| | | |
| | | that.getSend(); |
| | | |
| | | }, 1000); |
| | | }, |
| | | |
| | | onPullDownRefresh: function() { |
| | | var that = this; |
| | | |
| | | this.pullDown = true; |
| | | this.pagelist = 0; |
| | | this.pages = 0; |
| | | this.flag = true; |
| | | this.dataList = []; |
| | | this.newsList = []; |
| | | this.status = 'loading'; |
| | | this.keyValue = ''; |
| | | setTimeout(() => { |
| | | |
| | | that.getSend(); |
| | | |
| | | }, 1000) |
| | | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | |
| | | getSend() { |
| | | var that = this; |
| | | |
| | | if (that.pagelist < that.pages || that.pagelist == 0) { |
| | | that.pagelist++ |
| | | } else if (that.pagelist == that.pages) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state |
| | | .puserID, |
| | | method: "get", |
| | | data: { |
| | | 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 |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | goDetail(item) { |
| | | uni.navigateTo({ |
| | | url: './lookDetail?detailData=' + JSON.stringify(item) |
| | | }); |
| | | }, |
| | | searchValue(value) { |
| | | var that = this; |
| | | var str = value.replace(/\s*/g, ""); |
| | | if (str == '') { |
| | | return |
| | | } else { |
| | | that.newsList = []; |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store |
| | | .state |
| | | .puserID, |
| | | method: "get", |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | content: str |
| | | }, |
| | | success: (res) => { |
| | | var resdata = res.data.data.records; |
| | | |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | } |
| | | }, |
| | | clearValue() { |
| | | this.keyValue = '' |
| | | this.newsList = []; |
| | | |
| | | this.dataList.forEach(item => { |
| | | this.newsList.push(item) |
| | | }) |
| | | |
| | | if (this.pagelist < this.pages) { |
| | | this.flag = true; |
| | | this.status = 'loading'; |
| | | } else { |
| | | this.flag = false; |
| | | this.status = 'nomore'; |
| | | } |
| | | }, |
| | | changeValue(value) { |
| | | if (value == '') { |
| | | this.newsList = []; |
| | | |
| | | this.dataList.forEach(item => { |
| | | this.newsList.push(item) |
| | | }) |
| | | |
| | | if (this.pagelist < this.pages) { |
| | | this.flag = true; |
| | | this.status = 'loading'; |
| | | } else { |
| | | this.flag = false; |
| | | this.status = 'nomore'; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .page-container { |
| | | position: fixed; |
| | | display: block; |
| | | width: 100%; |
| | | max-height: 100vh; |
| | | |
| | | |
| | | |
| | | .head { |
| | | position: relative; |
| | | |
| | | |
| | | width: 100%; |
| | | |
| | | |
| | | .nav-wrap { |
| | | width: 100%; |
| | | height: 44px; |
| | | line-height: 30px; |
| | | padding: 7px 3px; |
| | | height: calc(44px + constant(safe-area-inset-top)); |
| | | height: calc(44px + env(safe-area-inset-top)); |
| | | color: rgb(255, 255, 255); |
| | | |
| | | .btn-return-box { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | box-sizing: border-box; |
| | | |
| | | .btn-return { |
| | | position: relative; |
| | | width: auto; |
| | | margin: 0 2px; |
| | | word-break: keep-all; |
| | | white-space: pre; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .header-title { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | width: 60%; |
| | | font-weight: 700; |
| | | line-height: 30px; |
| | | font-size: 16px; |
| | | opacity: 1; |
| | | text-overflow: ellipsis; |
| | | text-align: center; |
| | | min-width: 1em; |
| | | } |
| | | |
| | | .header-add { |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | | font: normal normal normal 14px/1 unibtn; |
| | | text-rendering: auto; |
| | | -webkit-font-smoothing: antialiased; |
| | | font-size: 24px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .top-absolute { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 101; |
| | | } |
| | | |
| | | .wrapper { |
| | | |
| | | width: 100%; |
| | | display: block; |
| | | height: calc(100% - 44px); |
| | | height: calc(100% - 44px - constant(safe-area-inset-top)); |
| | | height: calc(100% - 44px - env(safe-area-inset-top)); |
| | | |
| | | .body { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | |
| | | .body-content { |
| | | height: auto; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .u-card-wrap { |
| | | background-color: $u-bg-color; |
| | | padding: 1px; |
| | | } |
| | | |
| | | .u-body-item { |
| | | font-size: 32rpx; |
| | | color: #333; |
| | | padding: 20rpx 10rpx; |
| | | } |
| | | |
| | | .u-body-item image { |
| | | width: 120rpx; |
| | | flex: 0 0 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 8rpx; |
| | | margin-left: 12rpx; |
| | | } |
| | | |
| | | .u-search { |
| | | padding: 20rpx 30rpx 0 30rpx; |
| | | } |
| | | |
| | | .inTmain {} |
| | | |
| | | .msg { |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | |
| | | <view class="page-container" style="height: 100%; position: relative;"> |
| | | |
| | | <view class="wrapper"> |
| | | |
| | | <view class="body"> |
| | | |
| | | <view class="body-content"> |
| | | |
| | | <u-search v-model='keyValue' placeholder='请输入指令内容' shape="round" class="u-search" |
| | | input-align="center" height="70" @search='searchValue' @custom='searchValue' @clear='clearValue' |
| | | @change='changeValue'> |
| | | </u-search> |
| | | |
| | | <view v-show="newsList.length > 0"> |
| | | <view class="inTmain" v-for="(item,index) in newsList"> |
| | | <u-card :title="item.content" @click="goDetail(item)"> |
| | | <view class="" slot="body"> |
| | | <view> |
| | | <view style="margin-bottom: 10px;" class="u-body-item-title u-line-2"> |
| | | 发送指令人:{{item.sendName}}</view> |
| | | </view> |
| | | <view> |
| | | <view class="u-body-item-title u-line-2">接受指令人:{{item.receiveName}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="" slot="foot"> |
| | | </u-icon>发送指令时间:{{item.sendTime}}</view> |
| | | </u-card> |
| | | </view> |
| | | <u-loadmore class='msg' :status="status" /> |
| | | </view> |
| | | |
| | | <view class="msg" v-show='newsList.length == 0'> |
| | | 暂无数据 |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | dataList: [], |
| | | newsList: [], |
| | | |
| | | status: 'loadmore', |
| | | keyValue: '', |
| | | |
| | | dataList: [], |
| | | newsList: [], |
| | | pagelist: 0, |
| | | pages: 0, |
| | | flag: true, |
| | | |
| | | pullDown: false |
| | | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getReceive() |
| | | |
| | | }, |
| | | onReachBottom() { |
| | | var that = this; |
| | | |
| | | if (that.flag == false) { |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | // 后续将改为与后端联动 |
| | | that.status = 'loading'; |
| | | |
| | | setTimeout(() => { |
| | | |
| | | that.getReceive(); |
| | | |
| | | }, 1000); |
| | | }, |
| | | |
| | | onPullDownRefresh: function() { |
| | | var that = this; |
| | | |
| | | this.pullDown = true; |
| | | this.pagelist = 0; |
| | | this.pages = 0; |
| | | this.flag = true; |
| | | this.dataList = []; |
| | | this.newsList = []; |
| | | this.status = 'loading'; |
| | | this.keyValue = ''; |
| | | setTimeout(() => { |
| | | |
| | | that.getReceive(); |
| | | |
| | | }, 1000) |
| | | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | getReceive() { |
| | | var that = this; |
| | | |
| | | if (that.pagelist < that.pages || that.pagelist == 0) { |
| | | that.pagelist++ |
| | | } else if (that.pagelist == that.pages) { |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | return |
| | | } |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state |
| | | .puserID, |
| | | method: "get", |
| | | data: { |
| | | 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 |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | goDetail(item) { |
| | | uni.navigateTo({ |
| | | url: './lookDetail?detailData=' + JSON.stringify(item) |
| | | }); |
| | | }, |
| | | |
| | | searchValue(value) { |
| | | var that = this; |
| | | var str = value.replace(/\s*/g, ""); |
| | | if (str == '') { |
| | | return |
| | | } else { |
| | | that.newsList = []; |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state |
| | | .puserID, |
| | | method: "get", |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | content: str |
| | | }, |
| | | success: (res) => { |
| | | var resdata = res.data.data.records; |
| | | |
| | | resdata.forEach(item => { |
| | | that.newsList.push(item) |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | |
| | | that.flag = false |
| | | that.status = 'nomore'; |
| | | } |
| | | }, |
| | | clearValue() { |
| | | this.keyValue = '' |
| | | this.newsList = []; |
| | | |
| | | this.dataList.forEach(item => { |
| | | this.newsList.push(item) |
| | | }) |
| | | |
| | | if (this.pagelist < this.pages) { |
| | | this.flag = true; |
| | | this.status = 'loading'; |
| | | } else { |
| | | this.flag = false; |
| | | this.status = 'nomore'; |
| | | } |
| | | }, |
| | | changeValue(value) { |
| | | if (value == '') { |
| | | this.newsList = []; |
| | | |
| | | this.dataList.forEach(item => { |
| | | this.newsList.push(item) |
| | | }) |
| | | |
| | | if (this.pagelist < this.pages) { |
| | | this.flag = true; |
| | | this.status = 'loading'; |
| | | } else { |
| | | this.flag = false; |
| | | this.status = 'nomore'; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .page-container { |
| | | position: fixed; |
| | | display: block; |
| | | width: 100%; |
| | | max-height: 100vh; |
| | | |
| | | |
| | | |
| | | .head { |
| | | position: relative; |
| | | |
| | | |
| | | width: 100%; |
| | | |
| | | |
| | | .nav-wrap { |
| | | width: 100%; |
| | | height: 44px; |
| | | line-height: 30px; |
| | | padding: 7px 3px; |
| | | height: calc(44px + constant(safe-area-inset-top)); |
| | | height: calc(44px + env(safe-area-inset-top)); |
| | | color: rgb(255, 255, 255); |
| | | |
| | | .btn-return-box { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | box-sizing: border-box; |
| | | |
| | | .btn-return { |
| | | position: relative; |
| | | width: auto; |
| | | margin: 0 2px; |
| | | word-break: keep-all; |
| | | white-space: pre; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .header-title { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | width: 60%; |
| | | font-weight: 700; |
| | | line-height: 30px; |
| | | font-size: 16px; |
| | | opacity: 1; |
| | | text-overflow: ellipsis; |
| | | text-align: center; |
| | | min-width: 1em; |
| | | } |
| | | |
| | | .header-add { |
| | | position: absolute; |
| | | top: 0; |
| | | left: auto; |
| | | right: 10px; |
| | | bottom: 0; |
| | | margin: auto; |
| | | display: inline-block; |
| | | font: normal normal normal 14px/1 unibtn; |
| | | text-rendering: auto; |
| | | -webkit-font-smoothing: antialiased; |
| | | font-size: 24px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .top-absolute { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 101; |
| | | } |
| | | |
| | | .wrapper { |
| | | |
| | | width: 100%; |
| | | display: block; |
| | | height: calc(100% - 44px); |
| | | height: calc(100% - 44px - constant(safe-area-inset-top)); |
| | | height: calc(100% - 44px - env(safe-area-inset-top)); |
| | | |
| | | .body { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | |
| | | .body-content { |
| | | height: auto; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .u-card-wrap { |
| | | background-color: $u-bg-color; |
| | | padding: 1px; |
| | | } |
| | | |
| | | .u-body-item { |
| | | font-size: 32rpx; |
| | | color: #333; |
| | | padding: 20rpx 10rpx; |
| | | } |
| | | |
| | | .u-body-item image { |
| | | width: 120rpx; |
| | | flex: 0 0 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 8rpx; |
| | | margin-left: 12rpx; |
| | | } |
| | | |
| | | .u-search { |
| | | padding: 20rpx 30rpx 0 30rpx; |
| | | } |
| | | |
| | | .inTmain {} |
| | | |
| | | .msg { |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="container"> |
| | | |
| | | <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 type='textarea' v-model="form.recipientPeople" placeholder="请选择指令接收人" |
| | | @click="recipientClick" autoHeight /> |
| | | |
| | | <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> |
| | | |
| | | <view class="establish-box"> |
| | | |
| | | <u-button class="submit" type="primary" @click="initiateClick">发送</u-button> |
| | | |
| | | </view> |
| | | |
| | | <view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | data() { |
| | | return { |
| | | recipientShow: false, |
| | | recipientList: [], |
| | | |
| | | form: { |
| | | content: '', |
| | | recipient: '', |
| | | recipientData: [], |
| | | recipientPeople: '' |
| | | }, |
| | | rules: { |
| | | |
| | | content: [{ |
| | | min: 5, |
| | | required: true, |
| | | message: '指令内容不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | | }, |
| | | }; |
| | | }, |
| | | onLoad() {}, |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | }, |
| | | methods: { |
| | | recipientClick() { |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientShow = true; |
| | | return; |
| | | } |
| | | uni.request({ |
| | | 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.data.forEach(item => { |
| | | var flag = true |
| | | |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientList.forEach(it => { |
| | | if (item.id == it.id) flag = false |
| | | }) |
| | | } |
| | | |
| | | if (flag == true) { |
| | | if (item.id != this.$store.state |
| | | .UserData.user_id |
| | | ) { |
| | | item.checked = false; |
| | | this.recipientList.push(item) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | this.recipientShow = true; |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | |
| | | 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 + "/directive/saveDirectiveAndFile", |
| | | method: "post", |
| | | data: { |
| | | // 接收 |
| | | receiveDirectiveIds: str, |
| | | // 发送 |
| | | sendDirectiveId: this.$store.state |
| | | .UserData.user_id, |
| | | content: this.form.content |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.msg.indexOf('成功') != -1) { |
| | | this.$refs.uToast.show({ |
| | | title: '指令下发成功', |
| | | type: 'success', |
| | | url: '/pages/dispatch/dispatch' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | console.log('验证失败'); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | checkboxGroupChange(e) { |
| | | var that = this |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | var str = "" |
| | | var num = 0 |
| | | |
| | | that.form.recipientData.forEach((item, index) => { |
| | | that.recipientList.forEach((it, index) => { |
| | | if (item == it.id) { |
| | | if (num > 0) { |
| | | str += '、'; |
| | | str += it.real_name; |
| | | } else { |
| | | str += it.real_name |
| | | } |
| | | num += 1 |
| | | return |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | this.form.recipientPeople = str |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss"> |
| | | .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-input type='textarea' v-model="form.outcome" placeholder="请输入检查结果" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' prop="handlerResult" label="处理结果" :required="true"> |
| | | <u-input type='textarea' v-model="form.handlerResult" placeholder="请输入处理结果,整改要求,评价等" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="附属图片" class='imgissue-upload'> |
| | | <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs> |
| | | <image style="width: 4rem; height: 4rem; display: block;" @tap="takePhoto" |
| | |
| | | </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: '', |
| | | outcome: '', |
| | | handlerResult: '', |
| | | people: '', |
| | | peopleText: '', |
| | | unitText: '', |
| | |
| | | min: 2, |
| | | required: true, |
| | | message: '检查结果不能少于2个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | | handlerResult: [{ |
| | | min: 5, |
| | | required: true, |
| | | message: '处理结果不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | |
| | | 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, |
| | | handlerResult: this.form.handlerResult, |
| | | 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 label-width='132' prop="outcome" label="检查结果" :required="true"> |
| | | <u-input type='textarea' v-model="form.outcome" placeholder="请输入检查结果" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' prop="handlerResult" label="处理结果" :required="true"> |
| | | <u-input type='textarea' v-model="form.handlerResult" placeholder="请输入处理结果,整改要求,评价等" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="附属图片" class='imgissue-upload'> |
| | | <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs> |
| | |
| | | </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: '', |
| | | outcome: '', |
| | | handlerResult: '', |
| | | unit: '', |
| | | unitText: '' |
| | | }, |
| | |
| | | min: 2, |
| | | required: true, |
| | | message: '检查结果不能少于2个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | | handlerResult: [{ |
| | | min: 5, |
| | | required: true, |
| | | message: '处理结果不能少于5个字', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | |
| | |
| | | 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 |
| | | |
| | | }, |
| | | |
| | |
| | | reviewtime: this.getCurrentTime(), |
| | | insid: this.form.content, |
| | | results: this.form.outcome, |
| | | handlerResult: this.form.handlerResult, |
| | | 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> |
| | |
| | | <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" |
| | | inactive-color="#595959" height="100" @change="change"></u-tabs> |
| | | |
| | | <u-search v-show="current == 0" v-model='keyValue' placeholder='请输入保安员公司名称' shape="round" |
| | | <u-search v-show="current == 0" v-model='keyValue' placeholder='请输入被检查保安员名称' shape="round" |
| | | class="u-search" input-align="center" height="70" @search='searchValue' @custom='searchValue' |
| | | @clear='clearValue' @change='changeValue'> |
| | | </u-search> |
| | |
| | | |
| | | <view v-show="current == 0 && newsList.length > 0"> |
| | | <view class="inTmain" v-for="(item,index) in newsList"> |
| | | <u-card :title="item.sname" @click="goDetail(item)"> |
| | | <u-card :title="item.realname" @click="goDetail(item)"> |
| | | <view class="" slot="body"> |
| | | <view> |
| | | <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1"> |
| | |
| | | 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 |
| | | }, |
| | |
| | | this.pages = 0; |
| | | this.flag = true; |
| | | this.current = index; |
| | | this.keyValue = ""; |
| | | if (index == 0) { |
| | | this.getReceive(); |
| | | } else { |
| | |
| | | data: { |
| | | current: 1, |
| | | size: 999999, |
| | | sname: str |
| | | realName: str |
| | | }, |
| | | success: (res) => { |
| | | var resdata = res.data.data.records; |
| | |
| | | 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 { |
| | |
| | | <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-input type='textarea' v-model="form.content" placeholder="请输入通知内容" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width='132' label="接收人"> |
| | | |
| | | <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> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | recipientShow: false, |
| | | recipientList: [], |
| | | |
| | | form: { |
| | | title: '', |
| | | content: '' |
| | | content: '', |
| | | recipientData: [] |
| | | }, |
| | | rules: { |
| | | content: [{ |
| | |
| | | }, |
| | | mounted() {}, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | |
| | | this.$refs.uForm.setRules(this.rules); |
| | | |
| | | }, |
| | | methods: { |
| | | recipientClick() { |
| | | |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientShow = true; |
| | | return |
| | | } |
| | | |
| | | var data = null; |
| | | |
| | | if (this.$store.state.UserData.rname[0] == |
| | | '保安公司管理员') { |
| | | |
| | | data = { |
| | | type: 2, |
| | | deptid: this.$store.state.UserData.dept_id |
| | | } |
| | | |
| | | 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; |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | } else { |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + '/blade-user/pages?dispatch=0&jurisdiction=' + this.$store |
| | | .state.UserData.jurisdiction + '¤t=1&size=999999', |
| | | method: "get", |
| | | data: data, |
| | | success: (res) => { |
| | | |
| | | console.log(res, 546) |
| | | |
| | | this.recipientList = [] |
| | | res.data.data.records.forEach(item => { |
| | | |
| | | if (item.id != this.$store.state |
| | | .UserData.user_id |
| | | ) { |
| | | |
| | | item.checked = false |
| | | item.real_name = item.realName |
| | | this.recipientList.push(item) |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.recipientShow = true; |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | |
| | | checkboxGroupChange(e) { |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | }, |
| | | |
| | | getCurrentTime() { |
| | | let date = new Date(); |
| | |
| | | |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | |
| | | |
| | | if (this.form.recipientData.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: '请最少选择一个接收人', |
| | | }) |
| | | return |
| | | } |
| | | |
| | | var receivedNameStr = [] |
| | | |
| | | this.form.recipientData.forEach(it => { |
| | | |
| | | this.recipientList.forEach(item => { |
| | | |
| | | if (it.id == item.id) { |
| | | receivedNameStr.push(item.real_name) |
| | | } |
| | | |
| | | }) |
| | | |
| | | }) |
| | | |
| | | 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(), |
| | | receivedName: receivedNameStr.toString(), |
| | | receivedIds: this.form.recipientData.toString(), |
| | | }, |
| | | 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-input type='textarea' v-model="form.recipientPeople" placeholder="请选择接收人" |
| | | @click="recipientClick" autoHeight /> |
| | | |
| | | <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: [], |
| | | recipientPeople: '' |
| | | }, |
| | | 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 => { |
| | | |
| | | var flag = true |
| | | |
| | | if (this.recipientList.length > 0) { |
| | | this.recipientList.forEach(it => { |
| | | if (item.id == it.id) flag = false |
| | | }) |
| | | } |
| | | |
| | | if (flag == true) { |
| | | 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) { |
| | | var that = this |
| | | |
| | | this.form.recipientData = e |
| | | |
| | | var str = "" |
| | | var num = 0 |
| | | |
| | | that.form.recipientData.forEach((item, index) => { |
| | | that.recipientList.forEach((it, index) => { |
| | | if (item == it.id) { |
| | | if (num > 0) { |
| | | str += '、'; |
| | | str += it.real_name; |
| | | } else { |
| | | str += it.real_name |
| | | } |
| | | num += 1 |
| | | return |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | this.form.recipientPeople = str |
| | | |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </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'; |
| | | } |
| | |
| | | <i>学历</i> <span> {{ datalist.education }} </span> |
| | | </view> |
| | | <view class="once"> |
| | | <i>出生日期</i> <span> {{ datalist.birthtime }} </span> |
| | | <i>出生日期</i> <span> {{ datalist.birthday }} </span> |
| | | </view> |
| | | <view class="once"> |
| | | <i>政治面貌</i> <span> {{ datalist.politicaloutlook }} </span> |
| | | </view> |
| | | <view class="once"> |
| | | <i>联系电话</i> <span> {{ datalist.cell }} </span> |
| | | <i>联系电话</i> <span> {{ datalist.phone }} </span> |
| | | </view> |
| | | <view class="once"> |
| | | <i>所属公司</i> <span> {{ datalist.deptName }} </span> |
| | |
| | | 性别:<view class="o-once"> {{datalist.sex == 1 ? '男' : '女'}}</view> |
| | | </view> |
| | | <view class="once"> |
| | | 编号:<view class="o-once"> {{datalist.baoanzheng}}</view> |
| | | 编号:<view class="o-once"> {{datalist.securitynumber}}</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"> 南昌市公安局 </view> |
| | | </view> |
| | | <view class="once"> |
| | | 发证日期:<view class="o-once"> {{datalist.updateTime}}</view> |
| | | </view> |
| | | |
| | | <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar"> |
| | | <view slot="error" style="font-size: 1rem;">暂无证件</view> |
| | | </u-image> |
| | |
| | | <template v-slot:content> |
| | | <view> |
| | | <view class="u-order-title">在职时间:<view class="titles"> |
| | | {{item.entryTime.slice(0,11)}}至 {{item.departureTime.slice(0,11)}} |
| | | {{item.entrytime}}至 {{item.departuretime}} |
| | | </view> |
| | | </view> |
| | | <view class="u-order-desc">公司名称:{{item.companyname}}</view> |
| | |
| | | this.showc = true; |
| | | }, |
| | | getcongye() { |
| | | var url = this.$store.state.piAPI + '/experience/selectExperienceInfo', |
| | | var url = this.$store.state.piAPI + '/experience/page', |
| | | data = { |
| | | cardid: this.datalist.cardid |
| | | securityid: this.datalist.id |
| | | }, |
| | | that = this; |
| | | |
| | |
| | | data: data, |
| | | method: 'get', |
| | | success: (res) => { |
| | | var d = res.data.data; |
| | | var d = res.data.data.records; |
| | | var a = [] |
| | | // for(var k = 1 ;k < 30; k++){ |
| | | a.push(...d) |
| | | // } |
| | | that.cylist = a; |
| | | |
| | | console.log(that.cylist, 456) |
| | | } |
| | | |
| | | }) |
| | |
| | | } |
| | | |
| | | .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; |
| | |
| | | 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://192.168.0.108:81', |
| | | puserName: '', |
| | | puserID: '', |
| | | puserIphone: '', |
| | |
| | | }) |
| | | vm.$u.vuex('accessToken', '') |
| | | vm.$u.vuex('isLogin', false) |
| | | vm.$u.vuex('UserData', {}) |
| | | uni.redirectTo({ |
| | | url: '/pages/login/login-account' |
| | | }) |