新增家谱图,完善各模块新增时的电子文件上传功能,在上传期间显示正在上传
| | |
| | | }) |
| | | } |
| | | |
| | | // 获取家根网所有成员 |
| | | export function listRootAll(query) { |
| | | |
| | | return request({ |
| | | url: '/self/user/all', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | //上传文件 |
| | | export function uploadPic(data) { |
| | | return request({ |
| | | url: '/common/upload', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dateRange: [], |
| | | // 数据范围选项 |
| | | fot:[".jpg",".jif"], |
| | | fileList:[ |
| | | ], |
| | | fileListOther:[ |
| | | |
| | | ], |
| | | fileList:[], |
| | | fileListOther:[], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | // type: undefined, |
| | | title: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | kind: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //收藏与荣誉记录 |
| | | id:undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //通讯录 |
| | | id:undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | // type: undefined, |
| | | content: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <!-- <div style="width: 100px;--> |
| | | <!-- height: 24px;--> |
| | | <!-- font-size: 18px;--> |
| | | <!-- font-family: Microsoft YaHei-Regular, Microsoft YaHei;--> |
| | | <!-- font-weight: 400;--> |
| | | <!-- color: #000000;--> |
| | | <!-- line-height: 21px;--> |
| | | <!-- ">家庭小医生</div>--> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //就医记录 |
| | | id:undefined, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | // this.getCateInfor(); |
| | | this.getTypeOptions(); |
| | | // for (let i = 0; i < this.contactList.length; i++) { |
| | | // this.formDat[i] = this.contactList[i]; |
| | | // } |
| | | }, |
| | | methods: { |
| | | // 取消按钮 |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | createTime: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total" |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | |
| | | this.listRoot = response.data.data; |
| | | // alert(this.listRoot) |
| | | this.total = response.data.length; |
| | | this.pageNum=1; |
| | | this.pageSize=10; |
| | | // alert(this.total) |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | /** 查询类别信息 */ |
| | | getCateInfor() |
| | | { |
| | | let _this = this |
| | | getCategory().then(response=>{ |
| | | |
| | | response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | }) |
| | | }) |
| | | }, |
| | | // getCateInfor() |
| | | // { |
| | | // let _this = this |
| | | // getCategory().then(response=>{ |
| | | // |
| | | // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | // }) |
| | | // }) |
| | | // }, |
| | | //身份选择 |
| | | getSrc(identity) { |
| | | if (identity === '1'){ |
| | |
| | | } |
| | | }, |
| | | |
| | | /** 导入操作*/ |
| | | // handleEnport(params){ |
| | | // var file = params.file; |
| | | // var formData = new FormData(); |
| | | // formData.append('excelImport', file); |
| | | // let _this = this |
| | | // enload(formData).then(response => { |
| | | // _this.getList(); |
| | | // Message({ message: "导入成功", type: 'warning' }) |
| | | // |
| | | // }).catch(err) |
| | | // { |
| | | // Message({ message: "导入失败", type: 'error' }) |
| | | // } |
| | | // |
| | | // } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | </el-upload> |
| | | |
| | | |
| | | <el-form-item size="large"> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button> |
| | | </el-form-item> |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | createTime: undefined, |
| | |
| | | |
| | | |
| | | handlePictureCardPreview(file) { |
| | | |
| | | this.dialogImageUrl = file.url; |
| | | this.dialogVisible = true; |
| | | }, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="container"> |
| | | <h1 style="font-size:21px;padding-top:30px">早上好! |
| | | <h1 style="font-size: 21px;">{{ greeting +',' + user.userName }} |
| | | <el-dropdown style="float:right"> |
| | | <span class="el-dropdown-link"> |
| | | <img src="../../assets/images/Frame.png"> |
| | |
| | | <script> |
| | | |
| | | import {listRoot} from "@/api/root/index"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data(){ |
| | | return{ |
| | | user: {}, |
| | | greeting: "", |
| | | imageSrc: require('../../assets/images/Group 407.png') , |
| | | dropdownList: [ |
| | | { name: '只显示第一代', src: 'Group 407.png' }, |
| | |
| | | }, |
| | | created() { |
| | | |
| | | // this.getCateInfor() |
| | | // for (let i = 0; i < this.contactList.length; i++) { |
| | | // this.formDat[i] = this.contactList[i]; |
| | | // } |
| | | this.setGreeting(); |
| | | this.getUser(); |
| | | }, |
| | | mounted() { |
| | | this.getList(1); |
| | |
| | | } |
| | | }, |
| | | generation_1(){ |
| | | |
| | | |
| | | // alert(127) |
| | | // this.getList(1) |
| | | listRoot(1).then(response => { |
| | |
| | | } |
| | | ); |
| | | }, |
| | | setGreeting() { |
| | | const currentTime = new Date(); |
| | | const currentHour = currentTime.getHours(); |
| | | |
| | | if (currentHour < 12) { |
| | | this.greeting = "早上好"; |
| | | } else if (currentHour < 14) { |
| | | this.greeting = "中午好"; |
| | | } else if (currentHour < 18) { |
| | | this.greeting = "下午好"; |
| | | } else { |
| | | this.greeting = "晚上好"; |
| | | } |
| | | }, |
| | | |
| | | getUser() { |
| | | getUserProfile().then(response => { |
| | | this.user = response.data; |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | @keyup.enter.native="handleQuery"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | <!-- <el-input |
| | | v-model="searchVal" |
| | | placeholder="在“通讯录”中搜索" |
| | | clearable |
| | | style="width: 240px" |
| | | @input="inputChange"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | <div class="outer-table"> |
| | | 此父组件引用子组件tablemax |
| | | <tablemax label="myLabel" :tableData="contactList"> |
| | | <template v-slot:table> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleCheck(scope.row)" type="text" size="small" |
| | | >调用</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </tablemax> |
| | | </div>--> |
| | | |
| | | <!-- v-model="queryParams.id" |
| | | |
| | | v-model:phone="queryParams.phone" |
| | | v-model:wx="queryParams.wx" |
| | | v-model:qq="queryParams.qq" |
| | | v-model:twitter="queryParams.twitter" |
| | | v-model:isAlways="queryParams.isAlways" |
| | | v-model:remark="queryParams.remark" |
| | | @keyup.enter.native="handleQuery" |
| | | --> |
| | | </el-form-item> |
| | | <el-form-item label="名称" prop="name"> |
| | | |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <!-- <div style="width: 171px;--> |
| | | <!-- height: 28px;--> |
| | | <!-- font-size: 21px;--> |
| | | <!-- font-family: Microsoft YaHei-Regular, Microsoft YaHei;--> |
| | | <!-- font-weight: 400;--> |
| | | <!-- color: #000000;--> |
| | | <!-- line-height: 25px;--> |
| | | <!-- ">证件、荣誉、资质</div>--> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | <el-table v-loading="loading" :data="honorList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> |
| | | <el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> |
| | | <el-table-column fixed label="序号" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/> |
| | | <!-- <el-table-column label="时间" prop="createTime" sortable width="120" align="center">--> |
| | | |
| | | <!-- <template slot-scope="scope">{{scope.row.createTime? scope.row.createTime: '————'}}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="类别" prop="type" sortable :show-overflow-tooltip="true" width="120" align="center" > |
| | | <!-- <template slot-scope="scope">{{scope.row.type? scope.row.type: '————'}}</template>--> |
| | | <template slot-scope="scope">{{ getSrc1(scope.row.type) }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="名称" prop="name" sortable :show-overflow-tooltip="true" width="120" align="center" > |
| | | <!-- <template slot-scope="scope">{{scope.row.name? scope.row.name: '————'}}</template>--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <template v-if="formDat.name===1">{{ getSrc(scope.row.name) }}</template>--> |
| | | <!-- <template v-if="scope.row.name == 1">出生证</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 2">学生证</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 3">毕业证</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 4">结婚证</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 5">户口簿</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 6">独生子女证</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 7">高级职称</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 8">护照</template>--> |
| | | <!-- <template v-else-if="scope.row.name == 9">通行证</template>--> |
| | | <!-- <template v-else>{{ scope.row.name }}</template>--> |
| | | <!-- </template>--> |
| | | <el-table-column label="名称" prop="name" sortable width="120" align="center" > |
| | | <template slot-scope="scope">{{scope.row.name? scope.row.name: '————'}}</template> |
| | | </el-table-column> |
| | | <el-table-column label="证号/专业" prop="idNo" sortable width="170" align="center" > |
| | |
| | | <!-- 添加证书、荣誉、资质配置对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> |
| | | |
| | | <!-- <el-form-item label="时间" prop="createTime">--> |
| | | <!-- <el-input v-model="formDat.createTime" type='date' placeholder='选择日期' clearable :style="{width: '100%'}" >--> |
| | | <!-- </el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="获得时间" prop="happenTime">--> |
| | | <!-- <el-date-picker v-model='formDat.happenTime' type='date' placeholder='选择日期'></el-date-picker>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="类别" prop="type"> |
| | | <el-select v-model="formDat.type" placeholder="请选择类别" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value" |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //荣誉证书记录 |
| | | id:undefined, |
| | |
| | | created() { |
| | | this.getList(); |
| | | this.getTypeOptions(); |
| | | // for (let i = 0; i < this.contactList.length; i++) { |
| | | // this.formDat[i] = this.contactList[i]; |
| | | // } |
| | | }, |
| | | methods: { |
| | | // 取消按钮 |
| | |
| | | |
| | | }, |
| | | /** 查询类别信息 */ |
| | | getCateInfor() |
| | | { |
| | | let _this = this |
| | | getCategory().then(response=>{ |
| | | |
| | | // getCateInfor() |
| | | // { |
| | | // let _this = this |
| | | // getCategory().then(response=>{ |
| | | // |
| | | // // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | // // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | response.data.itemValues.replace("{", "").replace("}", "").split(",").map(elem => { |
| | | const label = elem.split(":")[0].trim(); |
| | | const value = parseInt(elem.split(":")[1].trim()); |
| | | _this.typeOptions.push({ "label": label, "value": value }); |
| | | }) |
| | | }) |
| | | }, |
| | | // const label = elem.split(":")[0].trim(); |
| | | // const value = parseInt(elem.split(":")[1].trim()); |
| | | // _this.typeOptions.push({ "label": label, "value": value }); |
| | | // }) |
| | | // }) |
| | | // }, |
| | | //类别选择 |
| | | getSrc1(type){ |
| | | if(type===0){ |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | }).catch(() => { Message({ message: "导入失败", type: 'error' })}); |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | type(value) { |
| | | if (value === '') { |
| | | this.showInput = true; |
| | | } else { |
| | | this.showInput = false; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <h1 style="font-size: 21px;">{{ greeting +',' + user.userName }}</h1> |
| | | <div class="image-container"> |
| | | <img class="top-image" src="../../assets/images/zhang.png" alt="Top Image"> |
| | | <img class="bottom-image" src="../../assets/images/bkg.png" alt="Bottom Image"> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { listRootAll } from "@/api/root/index"; |
| | | export default { |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | user: {}, |
| | | greeting: "", |
| | | rootList:[] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.setGreeting(); |
| | | this.getUser(); |
| | | }, |
| | | methods: { |
| | | setGreeting() { |
| | | const currentTime = new Date(); |
| | | const currentHour = currentTime.getHours(); |
| | | |
| | | if (currentHour < 12) { |
| | | this.greeting = "早上好"; |
| | | } else if (currentHour < 14) { |
| | | this.greeting = "中午好"; |
| | | } else if (currentHour < 18) { |
| | | this.greeting = "下午好"; |
| | | } else { |
| | | this.greeting = "晚上好"; |
| | | } |
| | | }, |
| | | |
| | | getUser() { |
| | | getUserProfile().then(response => { |
| | | this.user = response.data; |
| | | }); |
| | | listRootAll().then(response =>{ |
| | | this.rootList =response.data; |
| | | console.log(this.rootList) |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .app-container{ |
| | | background-color: #FEF7FC; |
| | | } |
| | | |
| | | .image-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | .top-image { |
| | | width: 50%; |
| | | /*height: 100%;*/ |
| | | object-fit: cover; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | opacity: 1; |
| | | } |
| | | |
| | | .bottom-image { |
| | | z-index: 1; /* 设置底层图片的层级为1 */ |
| | | width: 100%; |
| | | height: 100%; |
| | | /*position: absolute;*/ |
| | | top: 0; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | title: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileListOther" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | name: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | | uploading: false, |
| | | formDat: { |
| | | type: undefined, |
| | | happenTime: undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | <div style="padding-left:30px;padding-top:30px"> |
| | | <el-col :span="6" :data="individualList"> |
| | | <div class="block" :model="individualList" > |
| | | <el-col v-model="individualList.img" prop="img"> |
| | | <div v-if="!isEditing"> |
| | | <el-avatar shape="square" style="width: 200px;height: 150px;" > |
| | | <el-image |
| | | class="el-upload-list__item-thumbnail" |
| | | v-if="!individualList.img" |
| | | src="default-avatar-url" |
| | | :fit="fit" |
| | | style="width: 100%; height: 100%;" |
| | | ></el-image> |
| | | <el-image |
| | | v-else |
| | | :src="'http://47.93.189.255:8080/'+ individualList.img" |
| | | :fit="fit" |
| | | style="width: 100%;height: 100%;" |
| | | ></el-image> |
| | | </el-avatar> |
| | | <!-- <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]"--> |
| | | <!-- >--> |
| | | <!-- </div>--> |
| | | <!-- </el-upload>--> |
| | | </el-col> |
| | | </div> |
| | | |
| | | <el-upload v-else |
| | | class="upload-demo" |
| | | action="#" |
| | | :auto-upload="false" |
| | | :http-request="requestUpload" |
| | | :limit="1" |
| | | :file-list="fileList" |
| | | > |
| | | <el-avatar shape="square" style="width: 200px; height: 150px;"> |
| | | <el-image |
| | | class="el-upload-list__item-thumbnail" |
| | | v-if="!individualList.img" |
| | | src="default-avatar-url" |
| | | :fit="fit" |
| | | style="width: 100%; height: 100%;" |
| | | ></el-image> |
| | | <el-image |
| | | v-else |
| | | :src="'http://47.93.189.255:8080/' + individualList.img" |
| | | :fit="fit" |
| | | style="width: 100%; height: 100%;" |
| | | ></el-image> |
| | | </el-avatar> |
| | | </el-upload> |
| | | <div class="edit-text" v-if="isEditing" @click="uploadImage">点击更换图片</div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | </div> |
| | |
| | | <el-table-column label="开始日期" prop="startDate" sortable width="250" align="center" > |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.startDate }}</template> |
| | | <template v-else><el-input v-model="scope.row.startDate"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.startDate" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结束日期" prop="endDate" sortable width="250" align="center" > |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.endDate }}</template> |
| | | <template v-else><el-input v-model="scope.row.endDate"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.endDate" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主要学习经历、工作单位及任职情况" prop="content" sortable width="350" align="center" > |
| | |
| | | <el-table-column label="开始时间" prop="startTime" sortable width="230" align="center"> |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template> |
| | | <template v-else><el-input v-model="scope.row.startTime"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结束时间" prop="endTime" sortable width="230" align="center"> |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template> |
| | | <template v-else><el-input v-model="scope.row.endTime"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | |
| | | <el-table-column label="开始时间" prop="startTime" sortable width="200" align="center"> |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template> |
| | | <template v-else><el-input v-model="scope.row.startTime"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结束时间" prop="endTime" sortable width="200" align="center"> |
| | | <template slot-scope="scope"> |
| | | <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template> |
| | | <template v-else><el-input v-model="scope.row.endTime"></el-input></template> |
| | | <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="选择日期"></el-input></template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所到国家或者地区" prop="destination" sortable width="300" align="center" > |
| | |
| | | //个人信息数据 |
| | | individualList:[], |
| | | isEditing: false, |
| | | // fit:['fill'], |
| | | fit:['cover'], |
| | | // 个人经历数据 |
| | | experienceList: [], |
| | | // isEdit:true, |
| | |
| | | this.formDat[key] = ''; |
| | | }); |
| | | }, |
| | | handleUploadSuccess(response, file) { |
| | | // 处理文件上传成功后的回调 |
| | | this.individualList.img = response.url; |
| | | }, |
| | | |
| | | //下拉 |
| | | handleChange(activeNames) { |
| | | // console.log(val); |
| | |
| | | this.btn=false |
| | | this.isShow_2=false |
| | | this.isShow=true |
| | | this.isEditing = false |
| | | }); |
| | | } else { |
| | | this.$modal.msgSuccess("修改失败"); |
| | |
| | | // 刷新页面 |
| | | // window.location.reload(); |
| | | }, |
| | | uploadImage() { |
| | | const inputElement = document.createElement("input"); |
| | | inputElement.type = "file"; |
| | | inputElement.accept = "image/*"; |
| | | inputElement.style.display = "none"; |
| | | document.body.appendChild(inputElement); |
| | | |
| | | inputElement.addEventListener("change", () => { |
| | | const file = inputElement.files[0]; |
| | | if (file) { |
| | | const formData = new FormData(); |
| | | formData.append("image", file); |
| | | |
| | | // 调用uploadPic接口上传图片 |
| | | axios.post("/common/upload", formData, { |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }).then(response => { |
| | | // 上传成功,获取新图片的URL |
| | | const newImageUrl = response.data.img; |
| | | |
| | | // 假设individualList是一个对象,更新individualList.img |
| | | this.individualList.img = newImageUrl; |
| | | |
| | | // 假设fileList是一个数组,更新fileList中对应的图片URL |
| | | // const index = this.fileList.findIndex(item => item.id === fileId); |
| | | // this.fileList[index].url = newImageUrl; |
| | | |
| | | // 清除input元素并移除事件监听 |
| | | document.body.removeChild(inputElement); |
| | | inputElement.removeEventListener("change", null); |
| | | }).catch(error => { |
| | | console.error("上传失败:", error); |
| | | // 清除input元素并移除事件监听 |
| | | document.body.removeChild(inputElement); |
| | | inputElement.removeEventListener("change", null); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 触发点击事件,显示文件选择对话框 |
| | | inputElement.click(); |
| | | }, |
| | | //主要经历 |
| | | saveRowExperienceList(row) { |
| | | this.$refs['elForm'].validate(valid => { |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //百年心愿记录 |
| | | id:undefined, |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="理想标题" prop="title"> |
| | | <el-input |
| | | v-model="queryParams.title" |
| | |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="受惠人" prop="beneficiary" > |
| | | <el-input |
| | | v-model="queryParams.beneficiary" |
| | |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="继承人" prop="heir"> |
| | | <el-input |
| | | v-model="queryParams.heir" |
| | |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-cntainer> |
| | | <el-col :span="9" > |
| | | <el-form-item label="始于何因" prop="cause"> |
| | | <el-input |
| | | v-model="queryParams.cause" |
| | | placeholder="请输入原因" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否有效" prop="isEffective"> |
| | | <el-select v-model="queryParams.isEffective" placeholder="请选择是否有效" clearable |
| | | style="width: 240px" @keyup.enter.native="handleQuery"> |
| | | <el-option v-for="item in typeOptions" |
| | | :key="item.value" :label="item.label" :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button size="mini" @click="handleQuery" style=" width: 67px;height: 27px;background: #FFDDE3; |
| | | border-radius: 7px 7px 7px 7px;opacity: 1; " >搜索</el-button> |
| | | <el-button size="mini" @click="resetQuery" style=" width: 67px;height: 27px;background: #FFDDE3; |
| | | border-radius: 7px 7px 7px 7px;opacity: 1; ">重置</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-cntainer> |
| | | |
| | | |
| | | </el-form> |
| | | |
| | | <div> |
| | | <!-- <div style="width: 100px;--> |
| | | <!-- height: 24px;--> |
| | | <!-- font-size: 18px;--> |
| | | <!-- font-family: Microsoft YaHei-Regular, Microsoft YaHei;--> |
| | | <!-- font-weight: 400;--> |
| | | <!-- color: #000000;--> |
| | | <!-- line-height: 21px;--> |
| | | <!-- ">收藏和荣誉</div>--> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> |
| | | <i v-if="!uploading" slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | | |
| | | uploading: false, |
| | | formDat: { |
| | | //百年心愿记录 |
| | | id:undefined, |
| | |
| | | title:undefined, |
| | | heir:undefined, |
| | | beneficiary:undefined, |
| | | cause:undefined, |
| | | isEffective:undefined |
| | | // happenTime:undefined, |
| | | }, |
| | | // searchVal:"", |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getCateInfor() |
| | | // this.getCateInfor() |
| | | // for (let i = 0; i < this.contactList.length; i++) { |
| | | // this.formDat[i] = this.contactList[i]; |
| | | // } |
| | |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | |
| | | this.uploading = false; |
| | | this.$modal.msgSuccess("上传成功"); |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |