Browse Source

7.12

master
fengdong777 2 years ago
parent
commit
0dfeb3c0f8
  1. 163
      warehousing-system/project_web/src/components/initial_value/storehouse.vue
  2. 1092
      warehousing-system/project_web/src/components/pictureList/pictureList.vue
  3. 21
      warehousing-system/project_web/src/components/uploadFile/uploadTwo.vue

163
warehousing-system/project_web/src/components/initial_value/storehouse.vue

@ -185,30 +185,19 @@
<el-row> <el-row>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"><span slot="label">仓库坐标精</span></el-form-item> <el-form-item class="trightbs_item"><span slot="label">仓库经纬</span></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="20">
<el-form-item class="trightbs_item" <el-form-item class="trightbs_item"
><el-input ><el-input
v-model="form.lon" id="lngAndLat"
placeholder="精度" @blur="isLngAndLat"
v-model="jingweidu"
placeholder="经纬度坐标"
class="addinputw" class="addinputw"
clearable clearable
/></el-form-item> /></el-form-item>
</el-col> </el-col>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"><span slot="label">仓库坐标维度</span></el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item"
><el-input
v-model="form.lat"
placeholder="维度"
class="addinputw"
clearable
/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -537,37 +526,28 @@
<el-row> <el-row>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">仓库坐标精</span> <span slot="label">仓库经纬</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span>{{ temp.lon }}</span> <span>{{ temp.lon }},{{ temp.lat }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">仓库坐标维度</span> <span slot="label">房源</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span>{{ temp.lat }}</span> <span>{{ temp.housingResource }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">
<span slot="label">房源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<span>{{ temp.housingResource }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">库房面积</span> <span slot="label">库房面积</span>
@ -578,9 +558,6 @@
<span>{{ temp.acreage }}</span> <span>{{ temp.acreage }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">库房高度</span> <span slot="label">库房高度</span>
@ -591,6 +568,9 @@
<span>{{ temp.storeyHeight }}</span> <span>{{ temp.storeyHeight }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">月租金</span> <span slot="label">月租金</span>
@ -601,9 +581,6 @@
<span>{{ temp.monthlyPrice }}</span> <span>{{ temp.monthlyPrice }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightbs"> <el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"> <el-form-item class="trightbs_item">
<span slot="label">库房性质名称</span> <span slot="label">库房性质名称</span>
@ -701,7 +678,8 @@ export default {
fullscreenloading: null, fullscreenloading: null,
msg: [], msg: [],
imagesg:[], imagesg:[],
meetfunctions:[] meetfunctions:[],
jingweidu:''
}; };
}, },
watch: { watch: {
@ -709,7 +687,6 @@ export default {
deep: true, deep: true,
immediate: true, immediate: true,
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log(newVal);
const aa=[] const aa=[]
for (var i = 0; i < newVal.length; i++) { for (var i = 0; i < newVal.length; i++) {
aa.push(newVal[i].sid) aa.push(newVal[i].sid)
@ -766,9 +743,7 @@ export default {
this.storehouseList = result.data.records; this.storehouseList = result.data.records;
}, },
addStorehouseDialog() { addStorehouseDialog() {
this.clearList() this.claerArrList()
this.imgPrl=[]
this.imgList=[]
this.title = "新增仓库"; this.title = "新增仓库";
this.storehouseDialogVisible = true; this.storehouseDialogVisible = true;
}, },
@ -779,16 +754,13 @@ export default {
} }
}, },
async updataStorehousedialog(storehouse) { async updataStorehousedialog(storehouse) {
this.clearList() this.claerArrList()
this.imgList=[]
this.msg=[]
this.imgPrl=[]
this.imagesg=[]
this.title = "修改仓库"; this.title = "修改仓库";
this.storehouseDialogVisible = true; this.storehouseDialogVisible = true;
const { data: result } = await this.$http.get( const { data: result } = await this.$http.get(
`/v1/shstorehouse/fetchDetailsBySid/${storehouse.sid}` `/v1/shstorehouse/fetchDetailsBySid/${storehouse.sid}`
); );
this.jingweidu=result.data.lon+','+result.data.lat
if (result.code == 200) { if (result.code == 200) {
this.form = result.data; this.form = result.data;
let value=result.data.pics let value=result.data.pics
@ -800,6 +772,13 @@ export default {
this.msg.push(value[i]) this.msg.push(value[i])
} }
} }
},
claerArrList(){
this.clearList()
this.imgList=[]
this.msg=[]
this.imgPrl=[]
this.imagesg=[]
}, },
async addStorehouse() { async addStorehouse() {
const { data: result } = await this.$http.post( const { data: result } = await this.$http.post(
@ -809,11 +788,7 @@ export default {
if (result.code == 200) this.$message.success("成功添加仓库"); if (result.code == 200) this.$message.success("成功添加仓库");
this.getStorehouseList(); this.getStorehouseList();
this.storehouseDialogVisible = false; this.storehouseDialogVisible = false;
this.clearList() this.claerArrList()
this.msg=[]
this.imgList=[]
this.imgPrl=[]
this.imagesg=[]
}, },
async updataStorehouse() { async updataStorehouse() {
const { data: result } = await this.$http.post( const { data: result } = await this.$http.post(
@ -823,6 +798,7 @@ export default {
if (result.code == 200) this.$message.success("更新成功"); if (result.code == 200) this.$message.success("更新成功");
this.getStorehouseList(); this.getStorehouseList();
this.storehouseDialogVisible = false; this.storehouseDialogVisible = false;
this.claerArrList()
}, },
operationStorehouse() { operationStorehouse() {
if (this.title === "新增仓库") return this.addStorehouse(); if (this.title === "新增仓库") return this.addStorehouse();
@ -940,35 +916,6 @@ export default {
}); });
} }
}, },
handleSuccess(resp, file, fileList) {
console.log("222", resp);
const rdata = resp.data;
const _this = this;
_this.form.picUrl = rdata;
if (this.fullscreenloading) this.fullscreenloading.close();
this.fullscreenloading = null;
_this.$message({
showClose: true,
type: "success",
message: "导入成功",
});
},
handleProgress(event, file, fileList) {
const _this = this;
this.fullscreenloading = this.$loading({
lock: true,
text: "文件正在上传",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
console.log("111", event.percent);
if (event.percent >= 100) {
_this.fullscreenloading.text = "上传完成,正在导入数据库";
}
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
async LookStorehousedialog(purchase) { async LookStorehousedialog(purchase) {
this.addPurchaseDialogVisible = true; this.addPurchaseDialogVisible = true;
const _this = this; const _this = this;
@ -979,11 +926,6 @@ export default {
_this.temp = result.data; _this.temp = result.data;
} }
}, },
toDownload() {
if (this.temp.picUrl) {
window.open(this.temp.picUrl, "_blank");
}
},
backDatas(value) { backDatas(value) {
const aa = [] const aa = []
if (value.length > 0 && value != null && value != undefined) { if (value.length > 0 && value != null && value != undefined) {
@ -996,11 +938,58 @@ export default {
}, },
backData(value) { backData(value) {
this.form.picUrl = value[0].response.data this.form.picUrl = value[0].response.data
}, },
meetfunction(val){ meetfunction(val){
if(val.length==0){ if(val.length==0){
this.form.picUrl='' this.form.picUrl=''
// this.imgPrl=[]
} }
},
isLngAndLat() {
var index = document.getElementById("lngAndLat").value;
var array = index.split(",");
if (array[0] == undefined || array[1] == undefined){
this.$confirm(
"请输入经度和纬度,经纬度用','隔开!",
"提示",
{
showCancelButton:false,
confirmButtonText: "确定",
type: "warning",
}
).catch((error) => error);
return false;
}
var longreg = /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/;
if(!longreg.test(array[0])){
this.$confirm(
"经度整数部分为0-180,小数部分为0到6位!",
"提示",
{
showCancelButton:false,
confirmButtonText: "确定",
type: "warning",
}
).catch((error) => error);
return false;
}
//,0-9006
var latreg = /^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;
if(!latreg.test(array[1])) {
this.$confirm(
"纬度整数部分为0-90,小数部分为0到6位!",
"提示",
{
showCancelButton:false,
confirmButtonText: "确定",
type: "warning",
}
).catch((error) => error);
}
if(array!=undefined){
this.form.lon=array[0]
this.form.lat=array[1]
}
} }
}, },
mounted() { mounted() {

1092
warehousing-system/project_web/src/components/pictureList/pictureList.vue

File diff suppressed because it is too large

21
warehousing-system/project_web/src/components/uploadFile/uploadTwo.vue

@ -71,15 +71,20 @@
}, },
watch: { watch: {
imgUrl: { imgUrl: {
deep: true, deep: false,
immediate: true, immediate: false,
handler(newVal, oldVal) { handler(newVal, oldVal) {
if(newVal.url!=undefined){ let copy = newVal.slice();
let copy = newVal.slice(); let time=setTimeout(() => {
if(copy[0] !== undefined){
this.files = copy // console.log(copy[0].url);
} if(copy[0].url!== ''){
this.files = copy
clearTimeout(time)
}
}
}, 200);
this.files=[]
} }
} }
}, },

Loading…
Cancel
Save