|  |  |  | 
|---|
|  |  |  | <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}"> | 
|---|
|  |  |  | <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | .el-upload__input { | 
|---|
|  |  |  | display: none !important; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  | <div class="ibox-content" id="app" v-cloak> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="form-group" v-if="paramSetting.type==5"> | 
|---|
|  |  |  | <label class="col-md-2 control-label">{{paramSetting.name}}</label> | 
|---|
|  |  |  | <div class="col-md-8"> | 
|---|
|  |  |  | <!--                            <el-select v-model="paramSetting.userValue" placeholder="">--> | 
|---|
|  |  |  | <!--                                <el-option--> | 
|---|
|  |  |  | <!--                                        v-for="item in buttonType"--> | 
|---|
|  |  |  | <!--                                        :key="item.value"--> | 
|---|
|  |  |  | <!--                                        :label="item.displayName"--> | 
|---|
|  |  |  | <!--                                        :value="item.value">--> | 
|---|
|  |  |  | <!--                                </el-option>--> | 
|---|
|  |  |  | <!--                            </el-select>--> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | class="upload-demo" | 
|---|
|  |  |  | action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-button size="small" type="primary">点击上传</el-button> | 
|---|
|  |  |  | <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | <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: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | }else if(paramSettings[i].type === 5){ | 
|---|
|  |  |  | if(paramSettings[i].value != null && paramSettings[i].value != ''){ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if(paramSettings[i].type === 6){ | 
|---|
|  |  |  | _this.file.push(paramSettings[i].userValue); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | _this.paramSettings = paramSettings; | 
|---|
|  |  |  | 
|---|
|  |  |  | beforeRemove(file, fileList) { | 
|---|
|  |  |  | return this.$confirm(`确定移除 ${ file.name }?`); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleRemove(file) { | 
|---|
|  |  |  | console.log(file); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handlePictureCardPreview(file) { | 
|---|
|  |  |  | this.dialogImageUrl = file.url; | 
|---|
|  |  |  | this.dialogVisible = true; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleDownload(file) { | 
|---|
|  |  |  | console.log(file); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | submit() { | 
|---|
|  |  |  | console.log("提交"); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (paramSetting.type == 4) { | 
|---|
|  |  |  | userValue = paramSetting.userValue.join(","); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (paramSetting.type == 6) { | 
|---|
|  |  |  | userValue = _this.dialogImageUrl; | 
|---|
|  |  |  | alert(_this.dialogImageUrl); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let obj = { | 
|---|
|  |  |  | code: paramSetting.code, | 
|---|
|  |  |  | userValue: userValue | 
|---|