|  |  |  | 
|---|
|  |  |  | <label class="col-md-2 control-label">{{paramSetting.name}}</label> | 
|---|
|  |  |  | <div class="col-md-8"> | 
|---|
|  |  |  | <el-radio-group v-model="paramSetting.userValue"> | 
|---|
|  |  |  | <el-radio v-for="item in buttonType" | 
|---|
|  |  |  | <el-radio v-for="item in buttonTypeTwo" | 
|---|
|  |  |  | :key="item.value" | 
|---|
|  |  |  | :label="item.displayName" | 
|---|
|  |  |  | :value="item.value"></el-radio> | 
|---|
|  |  |  | :value="item.displayName"></el-radio> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="col-md-8"> | 
|---|
|  |  |  | <el-select v-model="paramSetting.userValue" placeholder=""> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="item in buttonType" | 
|---|
|  |  |  | v-for="item in buttonTypeThree" | 
|---|
|  |  |  | :key="item.value" | 
|---|
|  |  |  | :label="item.displayName" | 
|---|
|  |  |  | :value="item.displayName"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="col-md-8"> | 
|---|
|  |  |  | <el-select v-model="paramSetting.userValue" multiple placeholder="请选择"> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="item in buttonType" | 
|---|
|  |  |  | v-for="item in buttonTypeFour" | 
|---|
|  |  |  | :key="item.value" | 
|---|
|  |  |  | :label="item.displayName" | 
|---|
|  |  |  | :value="item.displayName"> | 
|---|
|  |  |  | 
|---|
|  |  |  | class="upload-demo" | 
|---|
|  |  |  | action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | :on-preview="handlePreview" | 
|---|
|  |  |  | :on-success="uploadSuccess" | 
|---|
|  |  |  | :on-remove="handleRemove" | 
|---|
|  |  |  | :before-remove="beforeRemove" | 
|---|
|  |  |  | multiple | 
|---|
|  |  |  | :limit="3" | 
|---|
|  |  |  | :limit="1" | 
|---|
|  |  |  | :on-exceed="handleExceed" | 
|---|
|  |  |  | :file-list="fileList"> | 
|---|
|  |  |  | <el-button size="small" type="primary">点击上传</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="form-group" v-if="paramSetting.type==6"> | 
|---|
|  |  |  | <label class="col-md-2 control-label">{{paramSetting.name}}</label> | 
|---|
|  |  |  | <div class="col-md-8"> | 
|---|
|  |  |  | <el-upload action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | list-type="picture-card" | 
|---|
|  |  |  | :auto-upload="false"> | 
|---|
|  |  |  | <i slot="default" class="el-icon-plus"></i> | 
|---|
|  |  |  | <img v-if="paramSetting.userValue" :src="paramSetting.userValue" style="max-width: 300px;"> | 
|---|
|  |  |  | <div slot="file" slot-scope="{file}"> | 
|---|
|  |  |  | <img class="el-upload-list__item-thumbnail" | 
|---|
|  |  |  | :src="file.url" alt="" > | 
|---|
|  |  |  | <span class="el-upload-list__item-actions"> | 
|---|
|  |  |  | <span class="el-upload-list__item-preview" | 
|---|
|  |  |  | @click="handlePictureCardPreview(file)" > | 
|---|
|  |  |  | <i class="el-icon-zoom-in"></i> | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | <!--                                    <span v-if="!disabled"--> | 
|---|
|  |  |  | <!--                                            class="el-upload-list__item-delete"--> | 
|---|
|  |  |  | <!--                                            @click="handleDownload(file)" >--> | 
|---|
|  |  |  | <!--                                      <i class="el-icon-download"></i>--> | 
|---|
|  |  |  | <!--                                    </span>--> | 
|---|
|  |  |  | <span v-if="!disabled" | 
|---|
|  |  |  | class="el-upload-list__item-delete" | 
|---|
|  |  |  | @click="handleRemove(file)" > | 
|---|
|  |  |  | <i class="el-icon-delete"></i> | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | :show-file-list="false" | 
|---|
|  |  |  | :on-success="imageLineSuccess"> | 
|---|
|  |  |  | <img v-if="imageLine" :src="imageLine" style="max-width: 300px;"> | 
|---|
|  |  |  | <el-button size="small" type="primary">点击上传</el-button> | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | <el-dialog :visible.sync="dialogVisible"> | 
|---|
|  |  |  | <img width="100%" :src="dialogImageUrl" alt=""> | 
|---|
|  |  |  | </el-dialog> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | var app = new Vue({ | 
|---|
|  |  |  | el: '#app', | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | dialogImageUrl: '', | 
|---|
|  |  |  | dialogVisible: false, | 
|---|
|  |  |  | disabled: false, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form: { | 
|---|
|  |  |  | warehouseId: '', | 
|---|
|  |  |  | shopId: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | warehouses: [], | 
|---|
|  |  |  | shops: [], | 
|---|
|  |  |  | categoryList: [], | 
|---|
|  |  |  | buttonType:[], | 
|---|
|  |  |  | buttonTypeThree:[], | 
|---|
|  |  |  | buttonTypeFour:[], | 
|---|
|  |  |  | buttonTypeTwo:[], | 
|---|
|  |  |  | fileList:[], | 
|---|
|  |  |  | codeName:'', | 
|---|
|  |  |  | imageLine:'', | 
|---|
|  |  |  | type:2, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created: function () { | 
|---|
|  |  |  | this.loadInfo(); | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取枚举列表 | 
|---|
|  |  |  | loadEnum(codeName){ | 
|---|
|  |  |  | loadEnum(codeName,type){ | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | //获取枚举列表 | 
|---|
|  |  |  | AjaxProxy.requst({ | 
|---|
|  |  |  | 
|---|
|  |  |  | url: basePath + '/common/data/getEnums', | 
|---|
|  |  |  | data:{"enumCodes":[_this.codeName]}, | 
|---|
|  |  |  | callback: function (data) { | 
|---|
|  |  |  | _this.buttonType = data.data[''+_this.codeName+'']; | 
|---|
|  |  |  | if(_this.type === 3){ | 
|---|
|  |  |  | _this.buttonTypeThree = data.data[''+_this.codeName+'']; | 
|---|
|  |  |  | }else if(_this.type === 4){ | 
|---|
|  |  |  | _this.buttonTypeFour = data.data[''+_this.codeName+'']; | 
|---|
|  |  |  | }else if(_this.type === 2){ | 
|---|
|  |  |  | _this.buttonTypeTwo = data.data[''+_this.codeName+'']; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | for (let i = 0; i < paramSettings.length; i++) { | 
|---|
|  |  |  | if (paramSettings[i].type === 2) { | 
|---|
|  |  |  | if(paramSettings[i].value != null && paramSettings[i].value != ''){ | 
|---|
|  |  |  | if(paramSettings[i].userValue === '1'){ | 
|---|
|  |  |  | paramSettings[i].userValue = '是'; | 
|---|
|  |  |  | }else if(paramSettings[i].userValue === '2'){ | 
|---|
|  |  |  | paramSettings[i].userValue = '否'; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | _this.codeName = paramSettings[i].value; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName); | 
|---|
|  |  |  | _this.type = paramSettings[i].type; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName,_this.type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if(paramSettings[i].type === 3){ | 
|---|
|  |  |  | if(paramSettings[i].value != null && paramSettings[i].value != ''){ | 
|---|
|  |  |  | _this.codeName = paramSettings[i].value; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName); | 
|---|
|  |  |  | _this.type = paramSettings[i].type; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName,_this.type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if(paramSettings[i].type === 4){ | 
|---|
|  |  |  | if(paramSettings[i].value != null && paramSettings[i].value != ''){ | 
|---|
|  |  |  | //下拉框回显 | 
|---|
|  |  |  | paramSettings[i].userValue = paramSettings[i].userValue.split(','); | 
|---|
|  |  |  | _this.codeName = paramSettings[i].value; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName); | 
|---|
|  |  |  | _this.type = paramSettings[i].type; | 
|---|
|  |  |  | _this.loadEnum(_this.codeName,_this.type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if(paramSettings[i].type === 5){ | 
|---|
|  |  |  | if(paramSettings[i].value != null && paramSettings[i].value != ''){ | 
|---|
|  |  |  | alert(paramSettings[i].userValue+"----类型"); | 
|---|
|  |  |  | _this.fileList.push(paramSettings[i].userValue); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if(paramSettings[i].type === 6){ | 
|---|
|  |  |  | _this.file.push(paramSettings[i].userValue); | 
|---|
|  |  |  | _this.imageLine = paramSettings[i].userValue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | _this.paramSettings = paramSettings; | 
|---|
|  |  |  | 
|---|
|  |  |  | console.log(file); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleExceed(files, fileList) { | 
|---|
|  |  |  | this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); | 
|---|
|  |  |  | this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | beforeRemove(file, fileList) { | 
|---|
|  |  |  | return this.$confirm(`确定移除 ${ file.name }?`); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleRemove(file) { | 
|---|
|  |  |  | console.log(file); | 
|---|
|  |  |  | uploadSuccess(res, file) { | 
|---|
|  |  |  | this.imageLine = res.path; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handlePictureCardPreview(file) { | 
|---|
|  |  |  | this.dialogImageUrl = file.url; | 
|---|
|  |  |  | this.dialogVisible = true; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleDownload(file) { | 
|---|
|  |  |  | console.log(file); | 
|---|
|  |  |  | imageLineSuccess(res, file) { | 
|---|
|  |  |  | this.imageLine = res.path; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | submit() { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (paramSetting.type == 6) { | 
|---|
|  |  |  | userValue = _this.dialogImageUrl; | 
|---|
|  |  |  | alert(_this.dialogImageUrl); | 
|---|
|  |  |  | userValue = _this.imageLine; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let obj = { | 
|---|
|  |  |  | code: paramSetting.code, | 
|---|