This commit is contained in:
2026-08-25 00:10:45 +08:00
parent e1bade226f
commit 1ef050dda6
35 changed files with 2041 additions and 263 deletions
+30
View File
@@ -70,6 +70,15 @@
class="maintenance-record-page__input"
/>
</template>
<template #address-form>
<el-input
v-model="form.address"
:disabled="boxType === 'view'"
readonly
placeholder="点击地图选址"
@click="openAddressMapPicker"
/>
</template>
<template #costForm>
<el-input
v-model="form.cost"
@@ -126,6 +135,11 @@
</template>
</avue-form>
</el-dialog>
<address-map-picker
v-model="addressMapPickerVisible"
:address="form.address"
@confirm="handleAddressMapConfirm"
/>
</basic-container>
</template>
@@ -140,6 +154,7 @@ import { openImportDialog } from '@/utils/import-excel';
import { formatUpdateUserName } from '@/utils/audit';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import AddressMapPicker from '@/components/address-map-picker/main.vue';
import { mapGetters } from 'vuex';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
@@ -149,6 +164,9 @@ const createTimeRangeMap = {
};
export default {
components: {
AddressMapPicker,
},
data() {
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
@@ -164,6 +182,7 @@ export default {
query: {},
loading: true,
excelBox: false,
addressMapPickerVisible: false,
excelForm: {},
isDetailLoading: false,
page: {
@@ -190,6 +209,7 @@ export default {
border: true,
index: true,
indexLabel: '序号',
indexWidth: 90,
viewBtn: true,
selection: true,
dialogClickModal: false,
@@ -291,6 +311,8 @@ export default {
{
label: '地址',
prop: 'address',
slot: true,
formslot: true,
minWidth: 180,
overHidden: true,
span: 24,
@@ -478,6 +500,14 @@ export default {
},
},
methods: {
openAddressMapPicker() {
if (this.boxType !== 'view') {
this.addressMapPickerVisible = true;
}
},
handleAddressMapConfirm(address) {
this.form.address = address;
},
hasPermission(code) {
return this.isAdmin || this.validData(this.permission[code], false);
},