From 1ceabefb451912daa5dda7768b7ef0b89a56c08a Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 25 Mar 2022 12:28:00 +0800 Subject: [PATCH] 1 --- zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html | 69 ++++++++++++++++++++++++++++++---- 1 files changed, 61 insertions(+), 8 deletions(-) diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html b/zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html index 3d653c1..c93a906 100644 --- a/zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html @@ -14,6 +14,11 @@ <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> @@ -84,14 +89,6 @@ <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" @@ -105,6 +102,41 @@ <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> @@ -136,6 +168,10 @@ var app = new Vue({ el: '#app', data: { + dialogImageUrl: '', + dialogVisible: false, + disabled: false, + form: { warehouseId: '', shopId: '', @@ -228,6 +264,8 @@ }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; @@ -248,6 +286,16 @@ 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("提交"); @@ -260,6 +308,11 @@ 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 -- Gitblit v1.9.1