| | |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot="routeRangeForm"> |
| | | <open-layers-map ref="OpenLayersMap" @toData="toData" :routeRange="form.routeRange"></open-layers-map> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import {getList, getDetail, add, update, remove} from "@/api/taskinfo/taskinfo"; |
| | | import option from "@/const/taskinfo/taskinfo"; |
| | | import {mapGetters} from "vuex"; |
| | | import OpenLayersMap from "@/components/OpenLayersMap"; |
| | | |
| | | export default { |
| | | components: { OpenLayersMap }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | this.form.routeRange = '\'' + this.form.routeRange + '\'' |
| | | }); |
| | | } else { |
| | | const date = new Date() |
| | |
| | | const strDate = date.getDate() |
| | | this.form.startTime = `${year}-${month}-${strDate} 00:00:00` |
| | | this.form.endTime = `${year}-${month}-${strDate} 23:59:59` |
| | | this.form.source = 'SYSTEMNEW' |
| | | this.form.state = '0' |
| | | } |
| | | done(); |
| | | }, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | params |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | toData(toData) { |
| | | this.form.routeRange = toData |
| | | } |
| | | } |
| | | }; |