|
|
@ -356,7 +356,7 @@ |
|
|
|
lunar |
|
|
|
@confirm="$emit('input',$event.fulldate)"/> |
|
|
|
<u-overlay v-if="type=='select-tab'" :show="show" @click="show=false"> |
|
|
|
<input class="select-tab-input" placeholder="请输入" @click.stop="" :focus="show" @blur="show=false" @confirm="addTab($event.detail.value)"/> |
|
|
|
<input class="select-tab-input" placeholder="请输入" @click.stop="" :focus="show" @blur="show=false" @confirm="addCode($event.detail.value)"/> |
|
|
|
</u-overlay> |
|
|
|
<view v-if="type=='map'" class="amap" :class="{show:showMap}"> |
|
|
|
<map id="amap"/> |
|
|
@ -563,6 +563,26 @@ import {computeArea} from '@/common/utils' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
async addCode(e){ |
|
|
|
if(e){ |
|
|
|
var res=await request("/common/api/dict/addDictItem",{ |
|
|
|
params:{ |
|
|
|
text:e, |
|
|
|
dictCode:this.dictCode |
|
|
|
} |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
uni.showToast({title:"添加成功!",icon:"none"}) |
|
|
|
this.dictCodeList.push({label: res.data.itemText,value: res.data.itemValue}) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||`添加${this.label}失败!`, |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
async afterRead(e){ |
|
|
|
this.imgList=this.imgList.concat(e.file.map(v=>Object.assign(v,{ |
|
|
|
status: 'uploading', |
|
|
@ -602,26 +622,6 @@ import {computeArea} from '@/common/utils' |
|
|
|
this.$refs.picker.setColumnValues(e.columnIndex+1,e.value[0].children) |
|
|
|
} |
|
|
|
}, |
|
|
|
async addTab(e){ |
|
|
|
if(e){ |
|
|
|
var res=await request("/common/api/dict/addDictItem",{ |
|
|
|
params:{ |
|
|
|
text:e, |
|
|
|
dictCode:this.dictCode |
|
|
|
} |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
uni.showToast({title:"添加成功!",icon:"none"}) |
|
|
|
this.dictCodeList.push({label: res.data.itemText,value: res.data.itemValue}) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||`添加${this.label}失败!`, |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
openMap(){ |
|
|
|
// uni.navigateTo({url:"/pages/massif/mapEditor"}) |
|
|
|