| | |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="编辑" append-to-body :visible.sync="editPopup" center @close="editClose"> |
| | | <avue-form ref="formRef" :option="option" v-model="editForm" @submit="rowUpdate"> |
| | | <avue-form ref="formRef" :option="option" v-model="editForm" @submit="handleSubmit"> |
| | | |
| | | <template slot-scope="{type, disabled}" slot="sceneGeo"> |
| | | <el-button type="primary" style="font-size: 14px; border: none;" icon="el-icon-map-location" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | setToken, |
| | | setRefreshToken, |
| | | removeToken, |
| | | removeRefreshToken, |
| | | } from "@/util/auth"; |
| | | import { |
| | | getList, |
| | | remove, |
| | |
| | | prop: "orderCode", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | width: 160, |
| | | overHidden: true, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入工单号", |
| | | trigger: "blur", |
| | | }, ], |
| | | addDisplay: false, |
| | | }, |
| | | { |
| | | width: 156, |
| | |
| | | prop: "issueTitle", |
| | | search: true, |
| | | searchSpan: 4, |
| | | width: 160, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择诉求主题", |
| | |
| | | parent: false, |
| | | prop: "issueContent", |
| | | search: false, |
| | | width: 160, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择诉求内容", |
| | |
| | | prop: "sceneGeo", |
| | | dataType: "string", |
| | | type: 'map', |
| | | hide: true, |
| | | width: 100, |
| | | viewDisplay: false, |
| | | // dataType: "string", |
| | | span: 24, |
| | | // value: [117.966460, 28.431002, ""] |
| | |
| | | label: "事发地点-经度", |
| | | prop: "sceneGeoLng", |
| | | disabled: true, |
| | | width: 100, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事发地点-经度", |
| | |
| | | }, |
| | | { |
| | | label: "事发场所", |
| | | width: 100, |
| | | prop: "scenePlace", |
| | | }, |
| | | { |
| | | label: "归口类型", |
| | | prop: "issueClazz", |
| | | type: "tree", |
| | | // dicUrl: "/api/blade-issueClazz/issueClazz/tree", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id" |
| | | // }, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择归口类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | dicUrl: "/api/blade-issueClazz/issueClazz/tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择归口类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | span: 12, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: "核实/督办", |
| | | prop: "tagRedo", |
| | | value: "Y", |
| | | value: "N1", |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "否", |
| | | value: "N" |
| | | value: "N1" |
| | | }, { |
| | | label: "是", |
| | | value: "Y" |
| | | value: "N2" |
| | | }], |
| | | }, |
| | | ], |
| | |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | console.log("*****11**********" + val) |
| | | console.log("*****789111**********" + !val) |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | |
| | | //经纬度替换 |
| | | this.form.sceneGeoLat = arr[1] |
| | | this.form.sceneGeoLng = arr[0] |
| | | this.form.location = arr[2] |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | |
| | | "editForm.sceneGeo": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | console.log("*****78910**********" + !val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | | this.editForm.sceneGeoLat = arr[1] |
| | | this.editForm.sceneGeoLng = arr[0] |
| | | this.editForm.location = arr[2] |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | // created() { |
| | | // const token = this.$route.query.token |
| | | // if (token) { |
| | | // setToken(token) |
| | | // } |
| | | // }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | |
| | | handleSubmit(form, done) { |
| | | update(form).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.editPopup = false |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | |
| | | this.sharePopup = false |
| | | }, |
| | | handleEdit(row) { |
| | | this.editForm = row |
| | | this.editPopup = true |
| | | getDetail(row.orderId).then((res) => { |
| | | this.editForm = res.data.data |
| | | this.editPopup = true |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.orderId).then((res) => { |
| | | this.form = res.data.data |
| | | // this.form.sceneAddr = [this.form.sceneGeoLng, this.form.sceneGeoLat, this.form.sceneAddr].join(',') |
| | | // if (this.form.imageUrls.length > 0) { |
| | | // var urls = [] |
| | | // var names = this.form.imageUrls.split(",") |
| | | // names.forEach(name => { |
| | | // urls.push(website.minioUrl + name) |
| | | // }) |
| | | // this.form.imageUrls = urls.join(",") |
| | | // } |
| | | }) |
| | | } |
| | | // con |