| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {listOfSpotTypesApi,spotTypesCreateApi,editSpotTypeApi,deleteSpotTypeApi} from '@/api/patchManagement/index' |
| | | import {searchManagementApi,listOfSpotTypesApi,spotTypesCreateApi,editSpotTypeApi,deleteSpotTypeApi} from '@/api/patchManagement/index' |
| | | import { ref, computed, watch } from 'vue' |
| | | import { enable, disable } from '@/api/resource/oss' |
| | | import { useStore } from 'vuex' |
| | |
| | | // ---------------- data ---------------- |
| | | const form = ref({}) |
| | | const query = ref({}) |
| | | const creatorOption = ref([]); |
| | | const loading = ref(true) |
| | | const page = ref({ |
| | | pageSize: 20, |
| | |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | searchSpan: 4, |
| | | type: 'select', |
| | | dicData: creatorOption, |
| | | props: { |
| | | label: 'label', |
| | | value: 'value', |
| | | }, |
| | | rules: [ |
| | | { required: true, message: '请输入创建人', trigger: 'blur' }, |
| | | ], |
| | |
| | | }) |
| | | |
| | | const data = ref([]) |
| | | |
| | | // 获取搜索数据 |
| | | const getsearchManagementApi = () => { |
| | | searchManagementApi().then(res => { |
| | | creatorOption.value = res.data.data.user_names.map(item => ({ |
| | | label: item, |
| | | value: item, |
| | | })); |
| | | |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // ---------------- watch ---------------- |
| | |
| | | router.push({ path: '/resource/patchManagement' }) |
| | | } |
| | | |
| | | const addPatchType = () => { |
| | | // TODO: 新增图斑类型逻辑 |
| | | } |
| | | |
| | | // ---------------- utils ---------------- |
| | | function validData (value) { |
| | | return value !== undefined && value !== null && value !== false |
| | | } |
| | | |
| | | function findObject (list, prop) { |
| | | return list.find(item => item.prop === prop) |
| | | } |
| | | |
| | | const crudRef = ref(null) |
| | | onMounted(() => { |
| | | getsearchManagementApi(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |