• 前端知识


    <template>
    <div>
    <el-table
    :data="tableData"
    stripe
    style=" 100%"
    @selection-change="handleSelectionChange"
    >
    <el-table-column
    type="selection"
    width="55"
    :selectable="selectable"
    >
    </el-table-column>
    <el-table-column
    type="index"
    width="50"
    >
    </el-table-column>
    <el-table-column
    prop="hash.username"
    label="人员姓名"
    >
    </el-table-column>
    <el-table-column
    prop="hash.grantime"
    label="获奖时间"
    >
    </el-table-column>
    <el-table-column
    prop="hash.content"
    label="获奖内容"
    >
    </el-table-column>
    <el-table-column label="附件">
    <template slot-scope="scope">
    <el-button size="mini" type="primary" @click="checkfilink(scope.row)">查看</el-button>
    </template>
    </el-table-column>
    <el-table-column
    label="审核状态"
    >
    <template slot-scope="scope">
    <span v-if="scope.row.hash.status=='1'">审核通过</span>
    <span v-if="scope.row.hash.status=='2'" style="color:red">审核不通过</span>
    </template>
    </el-table-column>
    </el-table>
    <el-pagination
    @current-change="handleCurrentChange"
    :currentPage.sync="pagobj.currentPage3"
    :pageSize="pagobj.pagesize"
    layout="total, prev, pager, next"
    :total="pagobj.total"
    style="margin:20px 0;text-align:center"
    >
    </el-pagination>
    <el-dialog title="附件信息" :visible.sync="dialogVisible" width="40%">
    <el-form labelWidth="150px">
    <el-table
    :data="flinklist"
    stripe
    style=" 100%"
    >
    <el-table-column type="index" width="50" label="序号"></el-table-column>
    <el-table-column prop="hash.filename" label="附件名"></el-table-column>
    <el-table-column label="附件">
    <template slot-scope="scope">
    <el-button size="mini" type="primary"><a :href="scope.row.hash.fileurl" download="" target="_Blank" style="color:#fff">下 载</a></el-button>
    </template>
    </el-table-column>
    </el-table>
    <el-form-item>
    <div>&nbsp;</div>
    </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
    <el-button size="mini" type="primary" @click="dialogVisible = false">返 回</el-button>
    </span>
    </el-dialog>
    </div>
    </template>

    <script>
    export default {
    data() {
    return {
    ts: this.newStore(),
    dialogVisible: false,
    flinklist:[],//拿到的附件数据
     
    };
    },
    props: {
    tableData: {
    type: Array,
    required: true,
    },
    pagobj: {
    type: Object,
    required: true,
    },
    },
    methods:{
    selectable(row){
    if (row.hash.status=='1') {
    return 0
    }else{
    return 1
    }
    },
    // 编辑
    checkfilink(item) {
    console.log(item, "00000");
    const req = {
    handle: "0E56125B90D2898ACAD2C3968249185CCD3A43E9777C4E90",
    filetype:'achieve',
    mainid: item.hash.id
    };
    this.spost(this.ts, "/mainservlet", req).then(ts => {
    if (ts.d.sflag == "success") {
    this.flinklist=ts.d.data.operation1
    console.log(ts.d.data, "0909");
    this.dialogVisible = true;
    }
    });
    },
    handleSelectionChange(val){
    console.log(val,'888');
    this.$emit('itemvals',val)
    },
    handleCurrentChange() {
    this.$parent.getperlist();
    },
    handleRemove(file, fileList) {
    console.log(file, fileList);
    },
    handlePictureCardPreview(file) {
    this.dialogImageUrl = file.url;
    this.dialogVisible2 = true;
    }
    },
    }
    </script>
  • 相关阅读:
    MongoDB笔记: 安装和常见问题
    Spring Boot方式的Dubbo项目
    Centos7安装Redis5.0.5并加入Systemd服务
    生成Nginx服务器SSL证书和客户端证书
    OpenSSL的证书, 私钥和签名请求(CSRs)
    迁移Git项目到Gitlab
    Ubuntu18.04 Server安装Nginx+Git服务和独立的svn服务
    ESXi6.5上的Ubuntu虚机在远程SSH时宕机
    Nginx访问路径添加密码保护
    从阿里云DATAV GeoAtlas接口抽取行政区划数据
  • 原文地址:https://www.cnblogs.com/guichao/p/11346528.html
Copyright © 2020-2023  润新知