| | |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | <el-button size="small" type="text" icon="el-icon-edit" plain @click="handleEdit(row)">编辑 |
| | | </el-button> |
| | | |
| | | <el-button size="small" type="text" icon="el-icon-delete" plain @click="rowDel(row)">删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </template> |
| | | |
| | | </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"> |
| | | |
| | | <template slot-scope="{type, disabled}" slot="sceneGeo"> |
| | | <el-button type="primary" style="font-size: 14px; border: none;" icon="el-icon-map-location" |
| | | @click="openMapTwo()">获取位置</el-button> |
| | | |
| | | <avue-input-map style="position: fixed; top: -11111111111111px;" ref="avueInputMapTwo" |
| | | :params="editForm.params" placeholder="请选择地图" v-model="editForm.sceneGeo"></avue-input-map> |
| | | </template> |
| | | |
| | | </avue-form> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="分享" append-to-body :visible.sync="sharePopup" center @close="popupClose"> |
| | | <div style="display: flex; justify-content: center; "> |
| | |
| | | } |
| | | |
| | | return { |
| | | editPopup: false, |
| | | form: {}, |
| | | editForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 310, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | |
| | | 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, |
| | | }, |
| | | { |
| | |
| | | "form.sceneGeo": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | console.log("*****123**********" + val) |
| | | console.log("*****456**********" + typeof(val)) |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | | this.form.sceneGeoLat = arr[1] |
| | | this.form.sceneGeoLng = arr[0] |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | |
| | | "editForm.sceneGeo": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | | this.editForm.sceneGeoLat = arr[1] |
| | | this.editForm.sceneGeoLng = arr[0] |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | this.$refs.avueInputMap.box = true |
| | | console.log(this.$refs.avueInputMap) |
| | | }, |
| | | openMapTwo() { |
| | | this.$refs.avueInputMapTwo.box = true |
| | | console.log(this.$refs.avueInputMap) |
| | | }, |
| | | |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | return remove(row.orderId) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | popupClose() { |
| | | this.sharePopup = false |
| | | }, |
| | | handleEdit(row) { |
| | | this.editForm = row |
| | | this.editPopup = true |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | |
| | | 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(',') |
| | | // 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(",") |