| | |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button type="danger" icon="el-icon-plus" size="small" plain @click.stop="$refs.crud.rowAdd()">新增</el-button> |
| | | <template slot-scope="{type,size, row}" slot="menu"> |
| | | <el-button |
| | | v-if="row.type != 1" |
| | | icon="el-icon-check" :size="size" :type="type" @click="setReal(row)">接收</el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size, row}" slot="menu"> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click="setReal(row)">接收</el-button> |
| | | <template slot-scope="{ row }" slot="type"> |
| | | <el-tag |
| | | >{{ |
| | | row.type == 1 ?"已接受":"未接受" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | |
| | | } from "@/api/feedback/feedback"; |
| | | import {getBaTree} from "@/api/client/client"; |
| | | import {mapGetters} from "vuex"; |
| | | import AvueMap from "avue-plugin-map"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | search: true, |
| | | searchLabelWidth: 100, |
| | | searchSpan: 5, |
| | | width: 100, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | |
| | | props: { |
| | | label: "title", |
| | | }, |
| | | width: 72, |
| | | hide: true, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "上报地址", |
| | | prop: "place", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入事发地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "经度", |
| | | prop: "jd", |
| | | }, |
| | | { |
| | | label: "纬度", |
| | | prop: "wd", |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "result", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入处理结果", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "上报时间", |
| | | prop: "stime", |
| | | width: 150, |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop: "place", |
| | | span: 10, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: null, |
| | | prop: "map", |
| | | labelWidth: "0", |
| | | searchSpan: 0, |
| | | maxlength: 0, |
| | | hide: true, |
| | | span: 2, |
| | | // display:false, |
| | | component: "AvueMap", |
| | | }, |
| | | { |
| | | label: "经度", |
| | | hide: true, |
| | | prop: "jd", |
| | | searchSpan: 2, |
| | | width: "100", |
| | | labelWidth: "120", |
| | | formatter: (row, value, label, column) => { |
| | | return (value = value.substring(0, 11)); |
| | | }, |
| | | span: 7, |
| | | }, |
| | | { |
| | | label: "纬度", |
| | | labelWidth: "45", |
| | | hide: true, |
| | | prop: "wd", |
| | | formatter: (row, value, label, column) => { |
| | | return (value = value.substring(0, 10)); |
| | | }, |
| | | span: 5, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "result", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入处理结果", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "接收状态", |
| | | prop: "type", |
| | | width: 80, |
| | | slot: true, |
| | | addDisplay: false, |
| | | viewDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "图片", |
| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | "form.map": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | var that = this; |
| | | if (val) { |
| | | //重新加载一次页面详情数据,解决新的省市区无法写入问题 |
| | | //判断是新增还是修改 |
| | | if (that.isEdit) { |
| | | getclient(this.form.id).then((res) => { |
| | | // that.province = res.data.data.province; |
| | | // that.city = res.data.data.city; |
| | | // that.district = res.data.data.district; |
| | | }); |
| | | } |
| | | |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | if (val.formattedAddress == "") { |
| | | return; |
| | | } |
| | | |
| | | //经纬度替换 |
| | | this.form.wd = val.latitude; |
| | | this.form.jd = val.longitude; |
| | | |
| | | var address = val.formattedAddress.toString(); |
| | | if (address.search("县") != -1) { |
| | | this.form.place = address.substring( |
| | | address.indexOf("县") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | if (address.search("区") != -1) { |
| | | this.form.place = address.substring( |
| | | address.indexOf("区") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | //写入新的省市区 |
| | | that.form.province = val.addressComponent.province; |
| | | if (val.addressComponent.city == "") { |
| | | that.form.city = val.addressComponent.province; |
| | | } else { |
| | | that.form.city = val.addressComponent.city; |
| | | } |
| | | that.form.district = val.addressComponent.district; |
| | | } else { |
| | | that.form.map = { |
| | | formattedAddress: "", |
| | | latitude: 28.699957, |
| | | longitude: 115.862118, |
| | | }; |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val != "") { |
| | |
| | | stime: row.stime, |
| | | result: row.result, |
| | | place: row.place, |
| | | jd: row.jd, |
| | | wd: row.wd, |
| | | }; |
| | | if (row.images.length > 0) { |
| | | var imageArr = row.images; |
| | |
| | | stime: row.stime, |
| | | result: row.result, |
| | | place: row.place, |
| | | jd: row.jd, |
| | | wd: row.wd, |
| | | }; |
| | | if (row.images.length > 0) { |
| | | var imageArr = row.images; |
| | |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | cancelButtonText: "取消", type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | //派遣任务 |
| | | setReal(row) { |
| | | var arr = []; |
| | | var data = { |
| | | id: row.id, |
| | | status: 1, |
| | | tpaddress: "", |
| | | spaddress: "", |
| | | sname: row.$snumber, |
| | | snumber: row.snumber, |
| | | stime: row.stime, |
| | | result: row.result, |
| | | place: row.place, |
| | | jd: row.jd, |
| | | wd: row.wd, |
| | | type: 1, |
| | | }; |
| | | updates(data).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!", |
| | | // }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | } |
| | | ); |
| | | |
| | | this.$store.state.tags.tagList.forEach((item) => { |
| | | if (item.label != "任务下发") { |
| | | arr.push(item); |