1
lzhe
2024-09-24 84c9568abb531f0abb892210301f14b40b0a82f1
1
已修改1个文件
41 ■■■■■ 文件已修改
src/views/master/person/main/personPerson.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/master/person/main/personPerson.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-09-23 16:27:33
 * @LastEditTime: 2024-09-24 15:47:04
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/master/person/main/personPerson.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -62,7 +62,13 @@
                                :show-file-list="false"
                                :on-success="(file)=>handleAvatarSuccess(file,scope.$index)"
                                :before-upload="(file)=>beforeAvatarUpload(file,scope.$index)">
                                <img v-if="scope.row.avatar" :src="scope.row.avatar" class="avatar">
                                <div v-if="scope.row.avatar" style="position: relative;">
                                    <img :src="scope.row.avatar" class="avatar">
                                    <div class="el-icon-editDom">
                                        <span class="el-icon-edit">编辑</span>
                                        <span class="el-icon-del" @click.stop="avatarDel(scope.$index)">删除</span>
                                    </div>
                                </div>
                                <el-icon v-else class="el-icon-plus avatar-uploader-icon"><Picture /></el-icon>
                            </el-upload>
                        </template>
@@ -210,6 +216,13 @@
        saveDialog, importTable,...ElementPlusIconsVue
    },
    methods: {
        avatarDel(index) {
            var obj = this.tableData[index];
            obj.avatar = "";
            this.$HTTP.post(`/api/blade-cps/employee/submit`,obj).then(res=> {
                this.searchPerson();
            })
        },
        handleAvatarSuccess(file,index) {
            var obj = this.tableData[index];
            obj.avatar = file.data.link;
@@ -597,6 +610,30 @@
        text-align: center;
        background-color: #c0c4cc;
    }
    .el-icon-editDom {
        position: absolute;
        left: 4px;
        top: 56px;
        font-weight: 700;
        color: #409eff;
    }
    .el-icon-editDom span {
        margin: 0;
        padding: 0;
        font-size: 12px;
        line-height: 18px;
        border: 1px solid #409eff;
        background: #fff;
        padding-left: 2px;
        padding-right: 2px;
        cursor: pointer;
    }
    .el-icon-editDom .el-icon-edit {
        margin-right: 4px;
    }
    .el-icon-editDom .el-icon-del {
    }
    .avatar {
        width: 80px;
        height: 80px;