5.8
pengwei
2025-05-08 b281791abab23d672922b7e9b7d1b51e348ed710
ÏîÄ¿´úÂë/ÉìËõ¸Ë/client/src/views/tts/Maintenancemanagement/Maintenancemanagement.vue
@@ -3,168 +3,311 @@
    <div class="Maintenancemanagement_l">
      <div class="content">
        <div class="checkbox">
          <span style="
          <span
            style="
              color: rgba(0, 9, 56, 1);
              font-size: 1.13rem;
              font-weight: bold;
            ">在检人员监控</span>
            "
            >在检人员监控</span
          >
          <div style="color: rgba(0, 9, 56, 1); font-size: 0.88rem">
            æ­£åœ¨æ£€ä¿®äººå‘˜æ•°é‡ï¼š<span style="color: red; font-size: 1.25rem; font-weight: bold">{{ totalCount }}</span>位
            æ­£åœ¨æ£€ä¿®äººå‘˜æ•°é‡ï¼š<span
              style="color: red; font-size: 1.25rem; font-weight: bold"
              >{{ totalCount }}</span
            >位
          </div>
        </div>
        <div class="serch">
          <div class="time_box">
            <el-select v-model="queryForm.selectType" :empty-values="[null, undefined]" placeholder="请选择" size="small"
              style="width: 9rem;height:2rem; margin-right: 0.98rem;">
              <el-option v-for="item in stateType" :key="item.value" :label="item.label" :value="item.value" />
            <el-select
              v-model="queryForm.selectType"
              :empty-values="[null, undefined]"
              placeholder="请选择"
              size="small"
              style="width: 9rem; height: 2rem; margin-right: 0.98rem"
            >
              <el-option
                v-for="item in stateType"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <div class="serch_box">
            <div class="serchb">全局搜索</div>
            <input v-model="queryForm.inputcontent" placeholder="请输入关键词搜索" style="border-left: 0.06rem solid #e2e2e2" />
            <input
              v-model="queryForm.inputcontent"
              placeholder="请输入关键词搜索"
              style="border-left: 0.06rem solid #e2e2e2"
            />
          </div>
          <el-button @click="handleQuery" type="primary" size="small"
            style="margin-left: 0.98rem; height: 2rem">查询</el-button>
          <el-button size="small" style="height: 2rem" @click="resetQuery">重置</el-button>
          <el-button
            @click="handleQuery"
            type="primary"
            size="small"
            style="margin-left: 0.98rem; height: 2rem"
            >查询</el-button
          >
          <el-button size="small" style="height: 2rem" @click="resetQuery"
            >重置</el-button
          >
        </div>
        <div style="margin-top: 1rem; height: 100%">
          <el-table empty-text="暂无数据" height="450" :data="tableData" style="width: 100%" :header-cell-style="{
            background: 'rgba(250,250,250,1)',
            color: '#101010',
            fontSize: '0.88rem',
            height: '3rem',
            border: 'none',
          }" :row-style="{
            color: '#101010',
            fontSize: '0.88rem',
            height: '3rem',
          }">
          <el-table
            empty-text="暂无数据"
            height="450"
            :data="tableData"
            style="width: 100%"
            :header-cell-style="{
              background: 'rgba(250,250,250,1)',
              color: '#101010',
              fontSize: '0.88rem',
              height: '3rem',
              border: 'none',
            }"
            :row-style="{
              color: '#101010',
              fontSize: '0.88rem',
              height: '3rem',
            }"
          >
            <el-table-column prop="userTrueName" label="姓名" align="center" />
            <el-table-column prop="userteam" label="班组" align="center" />
            <el-table-column prop="headImageUrl" label="人脸" align="center">
              <template #default="scope">
                <el-image style="width: 5rem; height: 5rem" :src="'http://192.168.0.80:1598' + scope.row.headImageUrl"
                  :fit="fit" />
                <el-image
                  style="width: 5rem; height: 5rem"
                  :src="'http://192.168.0.80:1598' + scope.row.headImageUrl"
                  :fit="fit"
                />
              </template>
            </el-table-column>
            <el-table-column prop="maintenanceDate" label="分配时间" align="center" />
            <el-table-column
              prop="maintenanceDate"
              label="分配时间"
              align="center"
            />
            <el-table-column prop="fuzyuan" label="检修状态" align="center">
              <template #default="scope">
                <span style="color: #e7a307; font-size: 0.88rem" v-if="scope.row.maintenanceStatus == 0">待开始</span>
                <span style="color: red; font-size: 0.88rem" v-if="scope.row.maintenanceStatus == 1">检修中</span>
                <span style="color: #eee; font-size: 0.88rem" v-if="scope.row.maintenanceStatus == 2">已完成</span>
                <span
                  style="color: #e7a307; font-size: 0.88rem"
                  v-if="scope.row.maintenanceStatus == 0"
                  >待开始</span
                >
                <span
                  style="color: red; font-size: 0.88rem"
                  v-if="scope.row.maintenanceStatus == 1"
                  >检修中</span
                >
                <span
                  style="color: #eee; font-size: 0.88rem"
                  v-if="scope.row.maintenanceStatus == 2"
                  >已完成</span
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div style="
        <div
          style="
            display: flex;
            justify-content: right;
            align-self: flex-end;
            margin-bottom: 1.19rem;
            margin-right: 1.25rem;
          ">
          <el-pagination size="small" background layout="prev, pager, next" :current-page="pageQuery.page"
            :page-size="pageQuery.rows" :total="pageTotal" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
          "
        >
          <el-pagination
            size="small"
            background
            layout="prev, pager, next"
            :current-page="pageQuery.page"
            :page-size="pageQuery.rows"
            :total="pageTotal"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </div>
    </div>
    <div class="Maintenancemanagement_r">
      <div class="content">
        <div class="checkbox">
          <span style="
          <span
            style="
              color: rgba(0, 9, 56, 1);
              font-size: 1.13rem;
              font-weight: bold;
            ">设置检修权限</span>
            "
            >设置检修权限</span
          >
        </div>
        <div class="serch">
          <div class="serch_box">
            <div class="serchb">全局搜索</div>
            <input v-model="queryForm1.inputcontent" placeholder="请输入关键词搜索"
              style="border-left: 0.06rem solid #e2e2e2" />
            <input
              v-model="queryForm1.inputcontent"
              placeholder="请输入关键词搜索"
              style="border-left: 0.06rem solid #e2e2e2"
            />
          </div>
          <el-button @click="handleQuery1" type="primary" size="small"
            style="margin-left: 0.98rem; height: 2rem">查询</el-button>
          <el-button size="small" style="height: 2rem" @click="resetQuery1">重置</el-button>
          <el-button
            @click="handleQuery1"
            type="primary"
            size="small"
            style="margin-left: 0.98rem; height: 2rem"
            >查询</el-button
          >
          <el-button size="small" style="height: 2rem" @click="resetQuery1"
            >重置</el-button
          >
        </div>
        <div style="margin-top: 1rem; height: 100%">
          <el-table empty-text="暂无数据" height="450" :data="gridData" style="width: 100%" :header-cell-style="{
            background: 'rgba(250,250,250,1)',
            color: '#101010',
            fontSize: '0.88rem',
            height: '3rem',
            border: 'none',
          }" :row-style="{
            color: '#101010',
            fontSize: '0.88rem',
            height: '3rem',
          }">
            <el-table-column prop="userTrueName" label="姓名" align="center" min-width="3%" />
            <el-table-column prop="userName" label="账号" align="center" min-width="3%" />
            <el-table-column prop="cardNumber" label="卡号" align="center" min-width="3%" />
          <el-table
            empty-text="暂无数据"
            height="450"
            :data="gridData"
            style="width: 100%"
            :header-cell-style="{
              background: 'rgba(250,250,250,1)',
              color: '#101010',
              fontSize: '0.88rem',
              height: '3rem',
              border: 'none',
            }"
            :row-style="{
              color: '#101010',
              fontSize: '0.88rem',
              height: '3rem',
            }"
          >
            <el-table-column
              prop="userTrueName"
              label="姓名"
              align="center"
              min-width="3%"
            />
            <el-table-column
              prop="userName"
              label="账号"
              align="center"
              min-width="3%"
            />
            <el-table-column
              prop="cardNumber"
              label="卡号"
              align="center"
              min-width="3%"
            />
            <el-table-column prop="userteam" label="班组" align="center" min-width="3%" />
            <el-table-column prop="headImageUrl" label="人脸" align="center" min-width="3%">
            <el-table-column
              prop="userteam"
              label="班组"
              align="center"
              min-width="3%"
            />
            <el-table-column
              prop="headImageUrl"
              label="人脸"
              align="center"
              min-width="3%"
            >
              <template #default="scope">
                <el-image style="width: 5rem; height: 5rem" :src="'http://192.168.0.80:1598' + scope.row.headImageUrl"
                  :fit="fit" />
                <el-image
                  style="width: 5rem; height: 5rem"
                  :src="'http://192.168.0.80:1598' + scope.row.headImageUrl"
                  :fit="fit"
                />
              </template>
            </el-table-column>
            <el-table-column label="操作" align="center" min-width="4%">
              <template #default="scope">
                <div v-if="scope.row.isPossible == null" style="
                <div
                  v-if="scope.row.isPossible == null"
                  style="
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    align-items: center;
                  ">
                  <el-button style="
                  "
                >
                  <el-button
                    style="
                      height: 2.32rem;
                      width:9rem;
                      width: 9rem;
                      font-size: 0.75rem;
                      color: #fff;
                      margin-left: 1rem;
                    " size="small" type="primary" @click="allow(scope.row)">允许进入检修</el-button>
                  <el-button style="
                    "
                    size="small"
                    type="primary"
                    @click="allow(scope.row)"
                    >允许进入检修</el-button
                  >
                  <el-button
                    style="
                      height: 2.32rem;
                      width: 9rem;
                      font-size: 0.75rem;
                      color: #fff;
                      margin-top: 0.25rem;
                    " size="small" @click="forbid(scope.row)" type="warning">禁止进入检修</el-button>
                    "
                    size="small"
                    @click="forbid(scope.row)"
                    type="warning"
                    >禁止进入检修</el-button
                  >
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div style="
        <div
          style="
            display: flex;
            justify-content: right;
            align-self: flex-end;
            margin-bottom: 1.19rem;
            margin-right: 1.25rem;
          ">
          <el-pagination size="small" background layout="prev, pager, next" :current-page="pageQuery1.page"
            :page-size="pageQuery1.rows" :total="pageTotal1" @size-change="handleSizeChange1"
            @current-change="handleCurrentChange1" />
          "
        >
          <el-pagination
            size="small"
            background
            layout="prev, pager, next"
            :current-page="pageQuery1.page"
            :page-size="pageQuery1.rows"
            :total="pageTotal1"
            @size-change="handleSizeChange1"
            @current-change="handleCurrentChange1"
          />
        </div>
      </div>
    </div>
    <!-- å…è®¸è¿›å…¥æ£€ä¿® -->
    <el-dialog v-model="claimdialogVisible" title="允许进入检修" width="400" align-center>
      <div style="
    <el-dialog
      v-model="claimdialogVisible"
      title="允许进入检修"
      width="400"
      align-center
    >
      <div
        style="
          height: 5rem;
          display: flex;
          justify-content: center;
          align-items: center;
        ">
        "
      >
        <el-icon color="#FAAD14">
          <WarningFilled />
        </el-icon>
        <span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem">是否确认【{{ info.userTrueName }}】今日允许进入检修?</span>
        <span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem"
          >是否确认【{{ info.userTrueName }}】今日允许进入检修?</span
        >
      </div>
      <template #footer>
        <div class="dialog-footer" style="text-align: right">
@@ -175,17 +318,26 @@
    </el-dialog>
    <!-- ç¦æ­¢è¿›å…¥æ£€ä¿® -->
    <el-dialog v-model="claimdialogVisible1" title="禁止进入检修" width="400" align-center>
      <div style="
    <el-dialog
      v-model="claimdialogVisible1"
      title="禁止进入检修"
      width="400"
      align-center
    >
      <div
        style="
          height: 5rem;
          display: flex;
          justify-content: center;
          align-items: center;
        ">
        "
      >
        <el-icon color="#FAAD14">
          <WarningFilled />
        </el-icon>
        <span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem">是否确认【{{ info.userTrueName }}】今日禁止进入检修?</span>
        <span style="color: rgba(0, 0, 0, 1); font-size: 1.25rem"
          >是否确认【{{ info.userTrueName }}】今日禁止进入检修?</span
        >
      </div>
      <template #footer>
        <div class="dialog-footer" style="text-align: right">
@@ -253,6 +405,9 @@
const claimdialogVisible = ref(false);
const claimdialogVisible1 = ref(false);
const info = ref({});
const account = localStorage.getItem("user")
  ? JSON.parse(localStorage.getItem("user")).userName
  : ""; //获取账号
//正在检修的人数
const totalCount = ref(0);
@@ -316,6 +471,7 @@
    pageSize: pageQuery.value.rows,
    searchKeyword: queryForm.value.inputcontent,
    status: queryForm.value.selectType,
    account: account,
  }).then((res) => {
    tableData.value = res.data.items;
    pageTotal.value = res.data.totalCount;
@@ -330,6 +486,7 @@
    pageIndex: pageQuery.value.page,
    pageSize: pageQuery.value.rows,
    searchKeyword: queryForm1.value.inputcontent,
    account: account,
  }).then((res) => {
    gridData.value = res.data.items;
    pageTotal1.value = res.data.totalCount;
@@ -351,6 +508,7 @@
    pageIndex: pageQuery.value.page,
    pageSize: pageQuery.value.rows,
    searchKeyword: queryForm1.value.inputcontent,
    account: account,
  }).then((res) => {
    gridData.value = res.data.items;
    pageTotal1.value = res.data.totalCount;
@@ -360,6 +518,7 @@
    pageSize: pageQuery.value.rows,
    searchKeyword: queryForm.value.inputcontent,
    status: queryForm.value.selectType,
    account: account,
  }).then((res) => {
    tableData.value = res.data.items;
    pageTotal.value = res.data.totalCount;
@@ -458,4 +617,4 @@
    margin-right: 0;
  }
}
</style>
</style>