diff --git a/src/api/base/region.js b/src/api/base/region.js index c0fa8093..29d94ca2 100644 --- a/src/api/base/region.js +++ b/src/api/base/region.js @@ -23,6 +23,15 @@ export const getLazyTree = (parentCode, params) => { }); }; +export const getLazyTreeAll =() =>{ + return request({ + url: '/blade-system/region/lazy-listAll', + method: 'get', + params: { + }, + }); +}; + export const getDetail = code => { return request({ url: '/blade-system/region/detail', diff --git a/src/views/basicdata/brand/basicClient.vue b/src/views/basicdata/brand/basicClient.vue index 2d3aa286..73d6bd75 100644 --- a/src/views/basicdata/brand/basicClient.vue +++ b/src/views/basicdata/brand/basicClient.vue @@ -49,6 +49,8 @@ end-placeholder="结束时间" :shortcuts="shortcuts" :size="'default'" + format="YYYY/MM/DD" + value-format="YYYY-MM-DD HH:mm:ss" /> @@ -183,6 +185,13 @@ + @@ -243,7 +252,7 @@ import option from "@/option/basicdata/basicClient"; import {mapGetters} from "vuex"; import BasicShopSub from "@/views/basicdata/brand/basicShopSub.vue"; import { getDictionaryBiz } from '@/api/system/dict' -import { getSelect,getLazyTree,getLazyList } from '@/api/base/region'; +import { getSelect,getLazyTree,getLazyList,getLazyTreeAll } from '@/api/base/region'; import { getToken } from '@/utils/auth'; import globalc from '@/api/basicdata/globalc'; @@ -255,9 +264,13 @@ export default { data () { return { height: 0, + showImgViewer: false, + imgPreviewUrl: [] ,// 当前要放大的图片存放位置 + fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}], + // 主键 basicClientId: '', - fileList:[], // 上传数据 + // fileList:[], // 上传数据 // 弹框标题 title: '', // 是否展示弹框 @@ -290,6 +303,7 @@ export default { }, // 选择行 selectionList: [], + testForm: { }, // 表单配置 option: option, // 表单列表 @@ -329,7 +343,11 @@ export default { } }, created() { - + getLazyTreeAll().then(res => { + if(res.data.success){ + this.optioner = res.data.data; + } + }) }, mounted () { this.init(); @@ -350,25 +368,30 @@ export default { } }, action() { - return '/api/blade-resource/oss/endpoint/put-file-attach' + return '/blade-resource/oss/endpoint/put-file' + // return '/api/blade-resource/oss/endpoint/put-file-attach' } }, methods: { - // - handlePreview(){ - + handleRemove(file, fileList) { + console.log('3333333',file, fileList); }, - // - handleRemove(){ - + handleCo(file, fileList) { + console.log('3333333',file, fileList); + this.showImgViewer = false }, - // - beforeRemove(){ + handlePreview(file) { + console.log("111111",file); + this.imgPreviewUrl[0] = file.url; + // this.imgPreviewUrl[0] = this.$api + file.response.data.id + this.showImgViewer = true }, - // - handleExceed(){ - + handleExceed(files, fileList) { + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); + }, + beforeRemove(file, fileList) { + return this.$confirm(`确定移除 ${ file.name }?`); }, async init() { //字典 @@ -376,16 +399,19 @@ export default { this.clientType = res.data.data; }); // console.log("globalc.optioner===",globalc.optioner); - let optioner = JSON.parse(localStorage.getItem('optioner')); - // console.log("-=-=-=-=",optioner); - if(optioner.length > 0){ - this.optioner = optioner - }else{ - globalc.useGetGlobalProperties().then(res =>{ - this.optioner = res; - localStorage.setItem("optioner",JSON.stringify(globalc.optioner)) - }); - } + // let optioner = JSON.parse(localStorage.getItem('optioner')); + // // console.log("-=-=-=-=",optioner); + // if(optioner.length > 0){ + // this.optioner = optioner + // console.log("打印》》》",this.optioner); + // }else{ + // globalc.useGetGlobalProperties().then(res =>{ + // this.optioner = res; + // console.log("打印》》》",this.optioner); + // localStorage.setItem("optioner",JSON.stringify(globalc.optioner)) + // }); + // } + // console.log('市111', this.optioner); @@ -528,7 +554,11 @@ export default { console.log( "-=-=",this.dataShi); this.query.contractStartTime = this.dataShi[0]; this.query.contractEntTime = this.dataShi[1]; - + } + if(!!this.query.bladeRegionProvinceId){ + this.query.bladeRegionCityId = this.query.bladeRegionProvinceId[1]; + this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2]; + this.query.bladeRegionProvinceId = this.query.bladeRegionProvinceId[0]; } getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { const data = res.data.data;