Browse Source

7.11

master
fengdong777 2 years ago
parent
commit
3c8664b663
  1. 59
      warehousing-system/project_web/src/components/initial_value/storehouse.vue
  2. 22
      warehousing-system/project_web/src/components/uploadFile/uploadTwo.vue
  3. 44
      warehousing-system/project_web/src/components/uploadFile/upload_yanchejianchaTuBiao.vue

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

@ -382,7 +382,7 @@
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<uploadTwo class="item_input" ref="uploadImg" v-model="imgPrl" @change="backData" bucket="map"
<uploadTwo class="item_input" ref="uploadImg" @passfunction = "meetfunction" :imgUrl="imagesg" v-model="imgPrl" @change="backData" bucket="map"
:upload-data="{ type: '0001' }"
></uploadTwo>
</el-form-item>
@ -394,7 +394,7 @@
</el-col>
<el-col :span="20">
<el-form-item class="trightbs_item">
<upload class="item_input" ref="uploadImg" v-model="imgList" @change="backDatas" bucket="map"
<upload class="item_input" ref="uploadImg" :minet-list="msg" v-model="imgList" @change="backDatas" bucket="map"
:upload-data="{ type: '0001' }"></upload>
</el-form-item>
</el-col>
@ -699,8 +699,25 @@ export default {
mapApiKey: "map",
shouhuoArrive: {},
fullscreenloading: null,
msg: [],
imagesg:[],
meetfunctions:[]
};
},
watch: {
imgList:{
deep: true,
immediate: true,
handler(newVal, oldVal) {
console.log(newVal);
const aa=[]
for (var i = 0; i < newVal.length; i++) {
aa.push(newVal[i].sid)
}
this.form.pics = aa
}
},
},
methods: {
//
indexMethod(index) {
@ -750,6 +767,8 @@ export default {
},
addStorehouseDialog() {
this.clearList()
this.imgPrl=[]
this.imgList=[]
this.title = "新增仓库";
this.storehouseDialogVisible = true;
},
@ -759,12 +778,29 @@ export default {
this.custList = result.data
}
},
updataStorehousedialog(storehouse) {
console.log(storehouse);
this.form = storehouse;
async updataStorehousedialog(storehouse) {
this.clearList()
this.imgList=[]
this.msg=[]
this.imgPrl=[]
this.imagesg=[]
this.title = "修改仓库";
this.storehouseDialogVisible = true;
},
const { data: result } = await this.$http.get(
`/v1/shstorehouse/fetchDetailsBySid/${storehouse.sid}`
);
if (result.code == 200) {
this.form = result.data;
let value=result.data.pics
const picImg=result.data.picUrl
this.imagesg.push({
url:picImg
})
for(let i=0;i<value.length;i++){
this.msg.push(value[i])
}
}
},
async addStorehouse() {
const { data: result } = await this.$http.post(
"/v1/shstorehouse/save",
@ -773,7 +809,11 @@ export default {
if (result.code == 200) this.$message.success("成功添加仓库");
this.getStorehouseList();
this.storehouseDialogVisible = false;
this.clearList();
this.clearList()
this.msg=[]
this.imgList=[]
this.imgPrl=[]
this.imagesg=[]
},
async updataStorehouse() {
const { data: result } = await this.$http.post(
@ -957,6 +997,11 @@ export default {
backData(value) {
this.form.picUrl = value[0].response.data
},
meetfunction(val){
if(val.length==0){
this.form.picUrl=''
}
}
},
mounted() {
this.getStorehouseList();

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

@ -28,9 +28,9 @@
default: 'abc'
},
//
width: {
img: {
type: String,
default: '270px'
default: ''
},
// limit: {
// type: Number,
@ -41,7 +41,7 @@
default: '.jpg,.jpeg,.png,.JPG,.JPEG,'
},
//
name: {
imgUrl: {
type: Array,
required: true
},
@ -70,18 +70,23 @@
}
},
watch: {
name: {
imgUrl: {
deep: true,
immediate: true,
handler(newVal, oldVal) {
this.files = newVal
if(newVal.url!=undefined){
let copy = newVal.slice();
this.files = copy
}
}
}
},
mounted() {
this.$nextTick(() => {
this.Init()
})
// this.$nextTick(() => {
// this.Init()
// })
},
created() {
@ -131,6 +136,7 @@
imgFiles.push(o.url)
})
this.$emit('fileChange', this.files)
this.$emit("passfunction",this.files)
},
handleRemove(file, fileList) {
console.log('file:' + JSON.stringify(file))

44
warehousing-system/project_web/src/components/uploadFile/upload_yanchejianchaTuBiao.vue

@ -48,7 +48,13 @@
uploadData: {
type: Object,
default: {}
},
MinetList: {
type: Array,
default: function () {
return []
}
}
},
data() {
return {
@ -76,12 +82,28 @@
handler(newVal, oldVal) {
this.files = newVal
}
}
},
MinetList: {
deep: true,
immediate: true,
handler(newVal, oldVal) {
let copy = newVal.slice();
if (copy !== undefined) {
// this.files = []
for (var i = 0; i < copy.length; i++) {
this.files.push({
url: copy[i].fileUrl,
name: copy[i].fileName,
sid: copy[i].sid,
})
}
}
}
},
},
mounted() {
this.$nextTick(() => {
this.Init()
})
// this.Init()
},
created() {
@ -95,15 +117,7 @@
},
//
Init() {
if (this.name !== undefined) {
this.files = []
for (var i = 0; i < this.name.length; i++) {
this.files.push({
name: this.name[i],
url: this.name[i]
})
}
}
},
handlePictureCardPreview(file) {
this.dialogVisible = true
@ -123,6 +137,7 @@
url: file.response.data.fileUrl,
sid: file.response.data.sid
})
console.log( this.files);
this.$emit('change', this.files)
this.$emit('eett', this.files)
}
@ -135,6 +150,7 @@
imgFiles.push(o.url)
})
this.$emit('fileChange', this.files)
console.log(this.files);
},
handleRemove(file, fileList) {
console.log('file:' + JSON.stringify(file))
@ -209,7 +225,7 @@
}
// console.log('event:', event)
}
}
},
}
</script>

Loading…
Cancel
Save