infoForm.vue 3.13 KB
<template>
  <!-- 专项行动填报情况 -->
  <el-dialog
    title="行动情况"
    :close-on-click-modal="false"
    :visible.sync="visible"
    class="NCC-dialog NCC-dialog_center"
    lock-scroll
    width="70%"
  >
    <el-row :gutter="15" style="height: 65vh">
        <el-col :span="24" style="margin-bottom: 20px;">
            <el-col :span="12" class="form-item">
                <div class="label w-100">行动标题:</div>
                <div>{{ form.title }}</div>
            </el-col>
            <el-col :span="12" class="form-item">
                <div class="label w-100">截止日期:</div>
                <div>{{ ncc.dateFormat(form.deadline) }}</div>
            </el-col>
        </el-col>
        <el-col :span="24" style="height: calc(100% - 100px);">
            <el-table :data="tableData" style="width: 100%" v-loading="loading" stripe>
              <el-table-column type="index" width="50" />
              <el-table-column prop="originName" label="部门名称" />
              <el-table-column prop="state" label="状态" >
                <template slot-scope="scope">
                  <el-tag :type="scope.row.state == '已填写' ? 'success' : 'warning'">{{scope.row.state}}</el-tag>
                </template>
              </el-table-column>
              <el-table-column label="操作" fixed="right" width="80" >
                <template slot-scope="scope">
                  <el-button type="text" @click="toDetail(scope.row)" v-if="scope.row.state == '已填写'">详情</el-button>
                </template>
              </el-table-column>
            </el-table>
            <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initList"/>
        </el-col>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
    </span>
  </el-dialog>
</template>
<script>
import request from "@/utils/request";
export default {
  components: {},
  props: [],
  data() {
    return {
      loading: false,
      visible: false,
      tableData: [{}],
      listQuery: {
        currentPage: 1,
        pageSize: 20,
      },
      total: 0,
      form: {},
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    close() {
        this.form = {};
        this.$emit("refresh");
    },
    init(row) {
        this.form = row;
        this.visible = true;
        this.loading = true;
        this.$nextTick(() => {
            this.initList();
        })
    },
    initList() {
        request({
            url: `/Extend/BaseSpecialActionInfo/GetListById`,
            method: "GET",
            params: {
              ...this.listQuery,
              specialActionId: this.form.id,
            },
          }).then((res) => {
            this.tableData = res.data.list;
            this.total = res.data.pagination.total;
            this.loading = false;
          });
        }
    },
    toDetail(row) {

    }
};
</script>
<style lang="scss" scoped>
.NCC-dialog {
    :deep(.el-pagination__total) {
        color: #606266;
    }
    :deep(.el-pagination__jump) {
        color: #606266;
    }
}
</style>