5 files modified
1 files renamed
| | |
| | | @import "uview-ui/index.scss"; |
| | | /*app全局样式*/ |
| | | @import 'static/style/app.scss'; |
| | | uni-modal{ |
| | | z-index:199999 !important; |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/taskinfo/eventsReported", |
| | | "path": "pages/eventgm/eventsReported", |
| | | "style": { |
| | | "navigationBarTitleText": "事件上报", |
| | | "enablePullDownRefresh": false |
| File was renamed from pages/taskinfo/eventsReported.vue |
| | |
| | | <u-form :model="form" ref="uForm" :rules="rules"> |
| | | |
| | | <u-form-item label="地址:"> |
| | | <u-input v-model="form.address" placeholder="请输入地址" @click="getAddress"/> |
| | | <u-input :disabled="true" v-model="form.address" placeholder="请输入地址" @click="getAddress"/> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label-width="20%" label="事件类型:" prop="type"> |
| | |
| | | > |
| | | </u-action-sheet> |
| | | |
| | | <u-form-item label-width="20%" label="事件状态:" prop="state"> |
| | | <!-- <u-form-item label-width="20%" label="事件状态:" prop="state"> |
| | | <u-input v-model="form.stateText" type="select" @click="showState = true" placeholder="请选择事件状态"/> |
| | | </u-form-item> |
| | | <u-action-sheet |
| | |
| | | title="请选择事件状态" |
| | | @click="stateSelect" |
| | | > |
| | | </u-action-sheet> |
| | | </u-action-sheet> --> |
| | | |
| | | <u-form-item label-width="20%" label="事件来源:"> |
| | | <!-- <u-form-item label-width="20%" label="事件来源:"> |
| | | <u-input :disabled="true" v-model="form.sourceText" type="select" @click="showSource = true" placeholder="请选择事件来源"/> |
| | | </u-form-item> |
| | | <!-- <u-action-sheet |
| | | <u-action-sheet |
| | | v-model="showSource" |
| | | :list="sourceList" |
| | | title="请选择事件状态" |
| | | title="请选择事件来源" |
| | | @click="sourceSelect" |
| | | > |
| | | </u-action-sheet> --> |
| | |
| | | data() { |
| | | return { |
| | | form: { |
| | | address:"", |
| | | address:"章贡区", |
| | | longitude:"", |
| | | latitude:"", |
| | | type:"", |
| | |
| | | key:e.dictKey |
| | | }) |
| | | }) |
| | | this.form.state = this.stateList[0].key |
| | | } |
| | | }) |
| | | }, |
| | |
| | | { |
| | | img: '/static/images/service/b1.png', |
| | | name: '事件上报', |
| | | url: '' |
| | | url: '../eventgm/eventsReported' |
| | | } |
| | | ], |
| | | // 服务列表 |
| | |
| | | </span> |
| | | </view> |
| | | <view class="once-c"> |
| | | <u-button type="success">开始任务</u-button> |
| | | <u-button v-if="taskinfoData.state == 0" type="success" @click="startTask(taskinfoData)">开始任务</u-button> |
| | | <u-button v-if="taskinfoData.state == 1" type="success" @click="finishTask(taskinfoData)">完成任务</u-button> |
| | | <u-button v-if="taskinfoData.state == 1" type="error" @click="goToEventsReported">事件上报</u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import { |
| | | getDetail |
| | | getDetail,update |
| | | } from "@/api/taskinfo/taskinfo" |
| | | export default { |
| | | data() { |
| | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | //任务开始事件 |
| | | startTask(item){ |
| | | uni.showModal({ |
| | | title:"提示", |
| | | content:"是否开始任务?", |
| | | success:(res)=> { |
| | | if(res.confirm){ |
| | | item.state = '1' |
| | | item.routeRange = '\'' + item.routeRange + '\'' |
| | | update(item).then(res=>{ |
| | | if(res.code == 200){ |
| | | this.getTaskinfoDetail() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | finishTask(item){ |
| | | uni.showModal({ |
| | | title:"提示", |
| | | content:"是否结束任务?", |
| | | success:(res)=> { |
| | | if(res.confirm){ |
| | | item.state = '2' |
| | | item.routeRange = '\'' + item.routeRange + '\'' |
| | | update(item).then(res=>{ |
| | | if(res.code == 200){ |
| | | this.getTaskinfoDetail() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | goToEventsReported(){ |
| | | uni.navigateTo({ |
| | | url:"/pages/eventgm/eventsReported" |
| | | }) |
| | | }, |
| | | }, |
| | | onLoad: function(options) { |
| | | if (options.id) { |
| | |
| | | transform: rotate(1turn); |
| | | } |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | taskinfoList: null |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getList() |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | }, |
| | |
| | | }, |
| | | //任务开始事件 |
| | | startTask(item){ |
| | | uni.showModal({ |
| | | title:"提示", |
| | | content:"是否开始任务?", |
| | | success:(res)=> { |
| | | if(res.confirm){ |
| | | item.state = '1' |
| | | item.routeRange = '\'' + item.routeRange + '\'' |
| | | update(item).then(res=>{ |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | //任务结束事件 |
| | | finishTask(item){ |
| | | uni.showModal({ |
| | | title:"提示", |
| | | content:"是否结束任务?", |
| | | success:(res)=> { |
| | | if(res.confirm){ |
| | | item.state = '2' |
| | | item.routeRange = '\'' + item.routeRange + '\'' |
| | | update(item).then(res=>{ |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | //事件上报 |
| | | goToEventsReported(){ |
| | | uni.navigateTo({ |
| | | url:"../taskinfo/eventsReported" |
| | | url:"/pages/eventgm/eventsReported" |
| | | }) |
| | | } |
| | | } |