|
@@ -659,7 +659,7 @@
|
|
|
<el-form-item label="图片" prop="photo">
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
- ref="upload"
|
|
|
+ ref="uploadty"
|
|
|
:action="defaultSettings.urls + process+'/common/upload'"
|
|
|
:on-preview="handlePreviewther"
|
|
|
:on-remove="handleRemovether"
|
|
@@ -679,7 +679,7 @@
|
|
|
size="small"
|
|
|
type="success"
|
|
|
:disabled = "disfal"
|
|
|
- @click="submitUploadther"
|
|
|
+ @click="submitUploadthers"
|
|
|
>上传到服务器</el-button
|
|
|
>
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
@@ -856,6 +856,10 @@ export default {
|
|
|
queryFormhye: {},
|
|
|
udgment: 0, //项目入统判断是新增 还是修改 新增0 修改1
|
|
|
udgmentList: [],
|
|
|
+ hfeiteka:false,//判断新增点击
|
|
|
+ ixndgh:false,
|
|
|
+ nbjieug:false,
|
|
|
+ remou:[]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -953,7 +957,21 @@ export default {
|
|
|
},
|
|
|
handleChange(file, fileList){
|
|
|
console.log(file, fileList)
|
|
|
+ if(fileList.length > 1){
|
|
|
+ // this.imagese = []
|
|
|
+ this.ixndgh = true
|
|
|
+ this.hfeiteka = true
|
|
|
+ }else{
|
|
|
+ // this.imagese = []
|
|
|
+ this.ixndgh = false
|
|
|
+ this.hfeiteka = false
|
|
|
+ }
|
|
|
+ console.log(986)
|
|
|
},
|
|
|
+ clearFiles () {
|
|
|
+ console.log(123)
|
|
|
+ this.$refs['uploadty'].clearFiles();
|
|
|
+ },
|
|
|
beforeAvatarUpload(file) {
|
|
|
console.log(file);
|
|
|
},
|
|
@@ -1017,13 +1035,22 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
beforeRemovetwo(file, fileList) {
|
|
|
- return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
+ // return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
},
|
|
|
submitUploadther() {
|
|
|
this.$refs.upload.submit();
|
|
|
},
|
|
|
+ submitUploadthers(){
|
|
|
+ this.$refs.uploadty.submit();
|
|
|
+ },
|
|
|
handleRemovether(file, fileList) {
|
|
|
- // console.log(file, fileList);
|
|
|
+ console.log(file, fileList);
|
|
|
+ if(fileList.length > 1){
|
|
|
+ this.nbjieug = true
|
|
|
+ }else{
|
|
|
+ this.nbjieug = false
|
|
|
+ }
|
|
|
+ console.log(6554)
|
|
|
},
|
|
|
handlePreviewther(file) {
|
|
|
console.log(file, 45);
|
|
@@ -1032,6 +1059,13 @@ export default {
|
|
|
handleSuccther(response, file, fileList) {
|
|
|
// let imges = []
|
|
|
|
|
|
+ // if( this.hfeiteka == false ){
|
|
|
+ // this.imagese = []
|
|
|
+ // console.log(this.imagese,9876)
|
|
|
+ // }
|
|
|
+ // if(!this.ixndgh){
|
|
|
+ // this.imagese = []
|
|
|
+ // }
|
|
|
this.imagese.push(file.response.url);
|
|
|
console.log(this.imagese.join(","), 345);
|
|
|
if (this.numhu == 0) {
|
|
@@ -1039,10 +1073,11 @@ export default {
|
|
|
} else if (this.numhu == 1) {
|
|
|
this.formtwo.photo = this.imagese.join(",");
|
|
|
} else if (this.numhu == 2) {
|
|
|
+ this.formther.photo = ''
|
|
|
this.formther.photo = this.imagese.join(",");
|
|
|
}
|
|
|
|
|
|
- console.log(this.form.photo);
|
|
|
+ console.log(this.imagese,34567);
|
|
|
if (file.response.code == 200) {
|
|
|
this.msgSuccess("上传成功");
|
|
|
}
|
|
@@ -1153,6 +1188,7 @@ export default {
|
|
|
this.configLisfour.filter((route) => {
|
|
|
if (route.photo !== null) {
|
|
|
let poku = [];
|
|
|
+ this.imagese = []
|
|
|
poku = route.photo.split(",");
|
|
|
route.photo = route.photo.split(",");
|
|
|
route.phototwo = route.photo[0];
|
|
@@ -1212,6 +1248,7 @@ export default {
|
|
|
this.open = false;
|
|
|
this.opentwo = false;
|
|
|
this.openther = false;
|
|
|
+ this.hfeiteka = false
|
|
|
this.reset();
|
|
|
},
|
|
|
// 表单重置
|
|
@@ -1227,16 +1264,27 @@ export default {
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
resettwo() {
|
|
|
- this.form = {
|
|
|
+ this.formtwo = {
|
|
|
// configId: undefined,
|
|
|
// configName: undefined,
|
|
|
// configKey: undefined,
|
|
|
// configValue: undefined,
|
|
|
// configType: "Y",
|
|
|
- // remark: undefined
|
|
|
+ photo: undefined
|
|
|
};
|
|
|
this.resetForm("formtwo");
|
|
|
},
|
|
|
+ resetther() {
|
|
|
+ this.formther = {
|
|
|
+ // configId: undefined,
|
|
|
+ // configName: undefined,
|
|
|
+ // configKey: undefined,
|
|
|
+ // configValue: undefined,
|
|
|
+ // configType: "Y",
|
|
|
+ photo: undefined
|
|
|
+ };
|
|
|
+ this.resetForm("formther");
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
@@ -1252,10 +1300,14 @@ export default {
|
|
|
handleAdd(index) {
|
|
|
this.numhu = index;
|
|
|
this.reset();
|
|
|
+
|
|
|
+ // this.hfeiteka = true
|
|
|
this.fileListtherrt = []
|
|
|
if (this.numhu == 0) {
|
|
|
this.open = true;
|
|
|
} else if (this.numhu == 2) {
|
|
|
+ this.formther.photo = ''
|
|
|
+ this.resetther()
|
|
|
this.openther = true;
|
|
|
}
|
|
|
|
|
@@ -1294,9 +1346,11 @@ export default {
|
|
|
this.msgSuccess("请上传照片");
|
|
|
return false
|
|
|
}
|
|
|
+ this.imagese = []
|
|
|
addConfigther(this.form).then((response) => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
+ this.hfeiteka = false
|
|
|
this.getListtoi();
|
|
|
});
|
|
|
}
|
|
@@ -1312,9 +1366,11 @@ export default {
|
|
|
this.msgSuccess("请上传照片");
|
|
|
return false
|
|
|
}
|
|
|
+ this.imagese = []
|
|
|
addConfigfour(this.formtwo).then((response) => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.opentwo = false;
|
|
|
+ this.hfeiteka = false
|
|
|
this.getListther();
|
|
|
});
|
|
|
}
|
|
@@ -1335,9 +1391,12 @@ export default {
|
|
|
this.msgSuccess("请上传照片");
|
|
|
return false
|
|
|
}
|
|
|
+ this.imagese = []
|
|
|
addConfigfiv(this.formther).then((response) => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.openther = false;
|
|
|
+ this.hfeiteka = false
|
|
|
+ // this.clearFiles()
|
|
|
this.getListfour();
|
|
|
this.getListfive()
|
|
|
});
|
|
@@ -1569,6 +1628,7 @@ export default {
|
|
|
this.numhu = index;
|
|
|
this.fileListtherrt = []
|
|
|
this.opentwo = true;
|
|
|
+ this.hfeiteka = true
|
|
|
this.titletwo = "添加参数";
|
|
|
},
|
|
|
//取消
|