<template>
  <div class="app-container">
    <div v-if="isShow">
      <!-- 筛选条件 -->
      <div>
        <el-form label-width="70px" size="small" label-position="left">
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="关键字" prop="account">
                <el-input placeholder="请输入关键字"></el-input>
              </el-form-item>
            </el-col>

            <el-col :xs="24" :sm="12" :lg="18" class="tr">
              <el-form-item label="">
                <el-button size="small" @click="resetScreenForm"
                  >清空</el-button
                >
                <el-button size="small" type="primary" @click="submitScreenForm"
                  >搜索</el-button
                >
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div class="mymain-container">
        <div class="table">
          <el-table
            v-loading="listLoading"
            :data="dataList"
            element-loading-text="Loading"
            border
            fit
            highlight-current-row
            stripe
          >
            <el-table-column
              type="selection"
              align="center"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="使用组织"
              prop="usename"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="编码"
              prop="bianMa"
              min-width="100"
              label-class-name="bianma"
              class-name="fontstyle"
            ></el-table-column>

            <el-table-column
              align="center"
              label="名称"
              prop="name"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="规格型号"
              prop="model"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="数据状态"
              prop="dataState"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="是否维护商城资料"
              prop="maintainData"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="是否维护内外机档案"
              prop="maintainFiles"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="基本单位"
              prop="baseCompany"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="已使用"
              prop="used"
              min-width="100"
            ></el-table-column>
            <el-table-column
              align="center"
              label="操作"
              prop="caozuo"
              min-width="160"
              show-overflow-tooltip
            >
              <el-button type="text" class="textColor" @click="editFn"
                >编辑</el-button
              >
              <el-button type="text" class="textColor">删除</el-button>
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="fr">
          <el-pagination
            :current-page="currentPage"
            :page-sizes="[10, 20, 30, 50]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :total="listTotal"
          >
          </el-pagination>
        </div>
      </div>
    </div>
    <MaterialListDetail v-else />
  </div>
</template>

<script>
import MaterialListDetail from "./components/material_list-detail.vue";
export default {
  data() {
    return {
      isShow: true,
      dataList: [
        {
          usename: "广州格匠机电工程有限公司",
          bianMa: "0021",
          name: "电器",
          model: "KFR-50LW/(50530)FNh",
          dataState: "已审核",
          maintainData: "是",
          maintainFiles: "是",
          baseCompany: "Pcs",
          used: "否",
        },
        {
          usename: "广州格匠机电工程有限公司",
          bianMa: "0021",
          name: "电器",
          model: "KFR-50LW/(50530)FNh",
          dataState: "已审核",
          maintainData: "是",
          maintainFiles: "是",
          baseCompany: "Pcs",
          used: "否",
        },
        {
          usename: "广州格匠机电工程有限公司",
          bianMa: "0021",
          name: "电器",
          model: "KFR-50LW/(50530)FNh",
          dataState: "已审核",
          maintainData: "是",
          maintainFiles: "是",
          baseCompany: "Pcs",
          used: "否",
        },
      ], // 列表数据

      screenForm: {
        // 筛选表单数据
        name: "", // 名称
      },
      currentPage: 1, // 当前页码
      pageSize: 10, // 每页数量
      listTotal: 0, // 列表总数
    };
  },
  components: { MaterialListDetail },
  methods: {
    editFn() {
      this.isShow = false;
    },
  },
};
</script>

<style lang="scss" scoped>
// ::v-deep .fontstyle {
//   color: #0909ff;
// }
// ::v-deep .bianma {
//   color: #409eff;
// }
</style>