智慧园区前端大屏
linwe
2024-11-11 d0ae76adc2c1b9601b370a0ec8bb989eabc07030
src/views/rt/components/box/dataContent.vue
@@ -21,34 +21,36 @@
let currentIndex = ref(0)
// 园区 企业
const tilteList = ref([
  { label: "吉水化工园区", value: "0", id: "1" }
  { label: "吉水化工园区", value: "0", id: "1" },
  { label: "吉水化工园区企业", value: "0", id: "2" }
]);
const pages = {
  page: 1,
  pageSize: 13,
  pageSize: 100,
  total: 0,
};
onMounted(() => {
  getLists();
  getCompanyPages();
  getLists(formInline);
  // getCompanyPages();
});
function getCompanyPages(param = {}) {
  param.current = pages.page;
  param.size = pages.pageSize;
  getPage(param).then(res => {
    let companyList = res.data.data.records
    companyList.forEach(item => {
      tilteList.value.push({
        label: item.name,
        value: item.id,
        id: item.id
      })
    })
  }).catch(err => {
  })
}
// function getCompanyPages(param = {}) {
//   param.current = pages.page;
//   param.size = pages.pageSize;
//   getPage(param).then(res => {
//     let companyList = res.data.data.records
//     companyList.forEach(item => {
//       tilteList.value.push({
//         label: item.name,
//         value: item.id,
//         id: item.id
//       })
//     })
//   }).catch(err => {
//   })
// }
function handleClick(item, index) {
  currentIndex.value = index
@@ -56,10 +58,8 @@
  pages.pageSize = 1000
  pages.total = 0
  if (item.id == 1) {
    formInline.firmId = ''
    formInline.type = 1
  } else {
    formInline.firmId = item.id
    formInline.type = 2
  }
  getLists(formInline);
@@ -78,7 +78,7 @@
// 搜索条件
const formInline = reactive({
  perInCha: "",
  type: ''
  type: '1'
});
// 提交查询
@@ -167,12 +167,20 @@
        <div class="page_box">
          <el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
          <el-table v-if="formInline.type == 1" :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
            :cell-style="tableCellStyle">
            <el-table-column fixed prop="perInCha" label="责任人姓名" />
            <el-table-column prop="perInChaPho" label="联系电话" />
            <el-table-column prop="teamName" label="救援队伍组名称" />
            <el-table-column prop="teamJob" label="救援队伍组职务" />
            <el-table-column prop="perInCha" label="责任人姓名" />
            <el-table-column prop="job" label="园区职务" />
            <el-table-column prop="perInChaPho" label="联系电话" />
          </el-table>
          <el-table v-else :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
            :cell-style="tableCellStyle">
            <el-table-column prop="firmName" label="企业名称" />
            <el-table-column prop="perInCha" label="责任人姓名" />
            <el-table-column prop="perInChaPho" label="联系电话" />
          </el-table>
        </div>