| | |
| | | <div class="app-container"> |
| | | <div class="form-header mt"> |
| | | <h4 class="dt h4">收藏与荣誉详细信息 </h4> |
| | | <el-button v-if="isShow" type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" >编辑</el-button> |
| | | <!-- <el-button v-if="isShow" type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" >编辑</el-button>--> |
| | | <!-- <br>--> |
| | | <!-- <el-button type="primary" class="pt" @click="handleExport"--> |
| | | <!-- v-hasPermi="['self:user:export']" >导出</el-button>--> |
| | | </div> |
| | | |
| | | <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"> |
| | | <div style="padding-left:15px"> |
| | | <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-position="left" label-width="120px"> |
| | | <!-- <el-form-item label="id" prop="id">--> |
| | | <!-- <el-input v-model="formData.id" placeholder="请输入id" :maxlength="11" show-word-limit :disabled="true"--> |
| | | <!-- clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="获得时间" prop="happenTime"> |
| | | <el-input v-model="formData.type" placeholder="请输入获得时间" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="类别" prop="type"> |
| | | <el-input v-model="formData.type" placeholder="请输入类别" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="formData.name" placeholder="请输入名称" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="来源" prop="source"> |
| | | <el-input v-model="formData.source" placeholder="请输入来源" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="拥有者" prop="张三"> |
| | | <el-input v-model="formData.owner" placeholder="请输入拥有者" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="价值" prop="price"> |
| | | <el-input v-model="formData.price" placeholder="请输入价值" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="存放位置" prop="location"> |
| | | <el-input v-model="formData.location" placeholder="请输入存放位置" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-container> |
| | | <el-row :span="12"> |
| | | <el-cow > |
| | | <el-form-item label="获得时间" prop="happenTime" label-width="70px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.happenTime" placeholder="请输入获得时间" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> |
| | | </el-form-item> |
| | | |
| | | <h4 class="form-header">电子文件 </h4> |
| | | <el-upload |
| | | action="#" |
| | | list-type="picture-card" |
| | | multiple |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" |
| | | alt="" |
| | | style="width: 147px; height: 147px" |
| | | fit="cover" |
| | | :preview-src-list="[file.url]" |
| | | </el-form-item> |
| | | <!-- <el-form-item label="获得时间" prop="happenTime" label-width="78px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">--> |
| | | <!-- <el-date-picker v-model='formData.happenTime' type='date' placeholder='请选择日期'></el-date-picker>--> |
| | | <!-- </el-form-item>--> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="类别" prop="type" label-width="40px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-select v-model="formData.type" placeholder="请选择类别" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="名称" prop="name" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.name" placeholder="请输入名称" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="来源" prop="source" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.source" placeholder="请输入来源" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="持有者" prop="owner" label-width="65px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.owner" placeholder="请输入持有者" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="价值" prop="price" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.price" placeholder="请输入价值" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="存放位置" prop="location" label-width="80px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.location" placeholder="请输入存放位置" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | <el-cow > |
| | | <el-form-item label="备注" prop="remark" label-width="45px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> |
| | | </el-form-item> |
| | | </el-cow> |
| | | </el-row> |
| | | </el-container> |
| | | <h4 class="form-header">电子文件 </h4> |
| | | <el-upload |
| | | action="#" |
| | | list-type="picture-card" |
| | | multiple |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <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.url)" |
| | | > |
| | | <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> |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" |
| | | alt="" |
| | | style="width: 147px; height: 147px" |
| | | fit="cover" |
| | | :preview-src-list="[file.url]" |
| | | > |
| | | <span class="el-upload-list__item-actions" > |
| | | <span |
| | | v-if="isShow" |
| | | class="el-upload-list__item-preview" |
| | | @click="handlePictureCardPreview(file)" |
| | | > |
| | | <i class="el-icon-zoom-in"></i> |
| | | </span> |
| | | <span |
| | | v-if="isShow" |
| | | class="el-upload-list__item-delete" |
| | | @click="handleDownload(file.url)" |
| | | > |
| | | <i class="el-icon-download"></i> |
| | | </span> |
| | | <span |
| | | v-if="isShow" |
| | | class="el-upload-list__item-delete" |
| | | @click="handleRemove(file)" |
| | | > |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | |
| | | |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | </el-upload> |
| | | |
| | | <h4 class="form-header">其他附件 </h4> |
| | | <el-upload |
| | | action="" |
| | | :file-list="fileListOther" |
| | | class="upload-demo" |
| | | multiple |
| | | :on-preview="handlePreview" |
| | | <!--<h4 class="form-header">其他附件 </h4> |
| | | <el-upload |
| | | action="" |
| | | :file-list="fileListOther" |
| | | class="upload-demo" |
| | | multiple |
| | | :on-preview="handlePreview" |
| | | |
| | | :on-remove="handleRemove" |
| | | :http-request="requestUpload" |
| | | :show-file-list="true" |
| | | > |
| | | <el-button type="primary">点击上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | </div> |
| | | </template> |
| | | :on-remove="handleRemove" |
| | | :http-request="requestUpload" |
| | | :show-file-list="true" |
| | | > |
| | | <el-button v-if="isShow" type="primary" >点击上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </el-upload> |
| | | </el-upload>--> |
| | | <h4 class="form-header">其他附件 </h4> |
| | | <el-upload |
| | | action="" |
| | | :file-list="fileListOther" |
| | | class="upload-demo" |
| | | multiple |
| | | list-type="picture-card" |
| | | :on-preview="handleFileCardPreview" |
| | | :on-remove="handleRemove" |
| | | :http-request="requestUpload" |
| | | :show-file-list="true" |
| | | > |
| | | |
| | | <el-form-item size="large"> |
| | | <el-button type="primary" @click="submitForm" :disabled="dsb" >修改</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | src="../../assets/401_images/401.gif" |
| | | alt="" |
| | | style="width: 147px; height: 147px" |
| | | fit="cover" |
| | | > |
| | | <span class="el-upload-list__item-actions"> |
| | | <span v-if="isShow" |
| | | class="el-upload-list__item-preview" |
| | | @click="handleFileCardPreview(file)" |
| | | > |
| | | <i class="el-icon-zoom-in"></i> |
| | | </span> |
| | | <span |
| | | v-if="isShow" |
| | | @click="handleRemove(file)" |
| | | class="el-upload-list__item-delete" |
| | | |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" alt="Preview Image" /> |
| | | </el-dialog> |
| | | > |
| | | <i class="el-icon-download"></i> |
| | | </span> |
| | | <span |
| | | v-if="isShow" |
| | | class="el-upload-list__item-delete" |
| | | @click="handleRemoveFile(file)" |
| | | > |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | </el-upload> |
| | | |
| | | <el-form-item size="large"> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb" >修改</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" style="width: 700px; height: 700px" alt="Preview Image" /> |
| | | </el-dialog> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }], |
| | | owner: [{ |
| | | required: true, |
| | | message: '请输入拥有者', |
| | | message: '请输入持有者', |
| | | trigger: 'blur' |
| | | }], |
| | | price: [{ |
| | |
| | | }], |
| | | |
| | | }, |
| | | typeOptions: [], |
| | | typeOptions: [ |
| | | { |
| | | value: '邮票', |
| | | label: '邮票' |
| | | }, { |
| | | value: '日本军刀', |
| | | label: '日本军刀' |
| | | }, { |
| | | value: '茅台酒', |
| | | label: '茅台酒' |
| | | }, { |
| | | value: '红木', |
| | | label: '红木' |
| | | }, { |
| | | value: '纪念品', |
| | | label: '纪念品' |
| | | }, { |
| | | value: '瓷器', |
| | | label: '瓷器' |
| | | }, { |
| | | value: '书籍', |
| | | label: '书籍' |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | computed: {}, |
| | |
| | | this.$route.meta.title = "修改收藏与荣誉详细信息";//列表的名称 |
| | | } |
| | | else{ |
| | | document.title = "查看收藏与荣誉详细信息"; |
| | | this.$route.meta.title = "查看收藏与荣誉详细信息";//列表的名称 |
| | | document.title = "收藏与荣誉详细信息"; |
| | | this.$route.meta.title = "收藏与荣誉详细信息";//列表的名称 |
| | | this.isShow=true |
| | | } |
| | | |
| | | let _this = this |
| | |
| | | resetForm() { |
| | | this.$refs['elForm'].resetFields() |
| | | }, |
| | | // //返回上一页 |
| | | // goBack(){ |
| | | // this.$router.push("/familymodel/collection/index" ); |
| | | // }, |
| | | handlePreview(file) |
| | | { |
| | | let formData = {'path':"/"+file.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; |
| | |
| | | }) |
| | | }, |
| | | handleRemoveFile(file) { |
| | | alert(23) |
| | | for(let i = 0; i < this.fileListOther.length; i++) |
| | | { |
| | | if(this.fileListOther[i].url==file.url) |
| | | this.$delete(this.fileListOther,i); |
| | | } |
| | | }, |
| | | handleRemove(file) { |
| | | alert(323) |
| | | for(let i = 0; i < this.fileList.length; i++) |
| | | { |
| | | if(this.fileList[i].url==file.url) |
| | | this.$delete(this.fileList,i); |
| | | } |
| | | }, |
| | | handleFileCardPreview(file){ |
| | | this.dialogFileUrl = file.url; |
| | | const Base64 = require('js-base64').Base64 |
| | | this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); |
| | | myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); |
| | | }, |
| | | handlePictureCardPreview(file) { |
| | | this.dialogImageUrl = file.url; |
| | |
| | | display: block; |
| | | position: absolute; |
| | | } |
| | | .form_item{ |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #000000; |
| | | } |
| | | </style> |