|
@@ -207,8 +207,8 @@ const permitStats = ref<PermitStat[]>([
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const qualificationWarnings = ref([
|
|
const qualificationWarnings = ref([
|
|
|
- { label: '证件过期', value: 0, accent: '#ff7a7a' },
|
|
|
|
|
- { label: '即将到期', value: 0, accent: '#e6ab00' }
|
|
|
|
|
|
|
+ { label: '证件过期', value: 0, accent: '#ff7a7a', key: 'expired' },
|
|
|
|
|
+ { label: '即将到期', value: 0, accent: '#e6ab00', key: 'warn' }
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const qhseMetricTabs = [
|
|
const qhseMetricTabs = [
|
|
@@ -946,6 +946,31 @@ const certQueryParams = reactive({
|
|
|
alertWarn: undefined as string | undefined
|
|
alertWarn: undefined as string | undefined
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const certWarningDialogVisible = ref(false)
|
|
|
|
|
+const certWarningDialogTitle = ref('')
|
|
|
|
|
+const certWarningLoading = ref(false)
|
|
|
|
|
+const certWarningList = ref<any[]>([])
|
|
|
|
|
+const certWarningTotal = ref(0)
|
|
|
|
|
+const certWarningQueryParams = reactive({
|
|
|
|
|
+ pageNo: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ deptId: userStore.getUser.deptId,
|
|
|
|
|
+ type: undefined as string | undefined,
|
|
|
|
|
+ classify: undefined as string | undefined,
|
|
|
|
|
+ userName: undefined as string | undefined,
|
|
|
|
|
+ expired: undefined as boolean | undefined,
|
|
|
|
|
+ alertWarn: undefined as boolean | undefined
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const getCertificateTypeText = (type: string) => {
|
|
|
|
|
+ const map: Record<string, string> = {
|
|
|
|
|
+ personal: '个人证书',
|
|
|
|
|
+ organization: '组织证书',
|
|
|
|
|
+ other: '其他'
|
|
|
|
|
+ }
|
|
|
|
|
+ return map[type] || type
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function formatDateCorrectly(timestamp: any) {
|
|
function formatDateCorrectly(timestamp: any) {
|
|
|
if (!timestamp) return ''
|
|
if (!timestamp) return ''
|
|
|
let time = Number(timestamp)
|
|
let time = Number(timestamp)
|
|
@@ -1016,6 +1041,39 @@ async function getCertificateBoardList() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+async function getCertificateWarningList() {
|
|
|
|
|
+ certWarningLoading.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const data = await IotMeasureCertApi.getIotMeasureCertPage(certWarningQueryParams)
|
|
|
|
|
+ certWarningList.value = data.list || []
|
|
|
|
|
+ certWarningTotal.value = data.total || 0
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ certWarningLoading.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function openCertificateWarningDialog(type: 'expired' | 'warn') {
|
|
|
|
|
+ certWarningQueryParams.pageNo = 1
|
|
|
|
|
+ certWarningQueryParams.pageSize = 10
|
|
|
|
|
+ certWarningQueryParams.deptId = userStore.getUser.deptId
|
|
|
|
|
+ certWarningQueryParams.type = undefined
|
|
|
|
|
+ certWarningQueryParams.classify = undefined
|
|
|
|
|
+ certWarningQueryParams.userName = undefined
|
|
|
|
|
+
|
|
|
|
|
+ if (type === 'expired') {
|
|
|
|
|
+ certWarningDialogTitle.value = '证件过期'
|
|
|
|
|
+ certWarningQueryParams.expired = true
|
|
|
|
|
+ certWarningQueryParams.alertWarn = undefined
|
|
|
|
|
+ } else {
|
|
|
|
|
+ certWarningDialogTitle.value = '证件即将到期'
|
|
|
|
|
+ certWarningQueryParams.expired = undefined
|
|
|
|
|
+ certWarningQueryParams.alertWarn = true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ certWarningDialogVisible.value = true
|
|
|
|
|
+ getCertificateWarningList()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function handleCertificateQuery() {
|
|
function handleCertificateQuery() {
|
|
|
certQueryParams.pageNo = 1
|
|
certQueryParams.pageNo = 1
|
|
|
getCertificateBoardList()
|
|
getCertificateBoardList()
|
|
@@ -1262,7 +1320,8 @@ onUnmounted(() => {
|
|
|
<div
|
|
<div
|
|
|
v-for="item in qualificationWarnings"
|
|
v-for="item in qualificationWarnings"
|
|
|
:key="item.label"
|
|
:key="item.label"
|
|
|
- class="qualification-item">
|
|
|
|
|
|
|
+ class="qualification-item qualification-item--clickable"
|
|
|
|
|
+ @click="openCertificateWarningDialog(item.key)">
|
|
|
<span class="qualification-item__label">{{ item.label }}:</span>
|
|
<span class="qualification-item__label">{{ item.label }}:</span>
|
|
|
<strong :style="{ color: item.accent }">
|
|
<strong :style="{ color: item.accent }">
|
|
|
<CountTo
|
|
<CountTo
|
|
@@ -1453,13 +1512,93 @@ onUnmounted(() => {
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</Dialog>
|
|
</Dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <Dialog v-model="certWarningDialogVisible" :title="certWarningDialogTitle" width="1100px">
|
|
|
|
|
+ <div class="certificate-warning-dialog">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :loading="certWarningLoading"
|
|
|
|
|
+ :data="certWarningList"
|
|
|
|
|
+ :row-style="tableRowStyle"
|
|
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
|
|
+ height="400"
|
|
|
|
|
+ class="device-list-table production-brief-table">
|
|
|
|
|
+ <el-table-column label="序号" width="80" align="center">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{
|
|
|
|
|
+ (certWarningQueryParams.pageNo - 1) * certWarningQueryParams.pageSize +
|
|
|
|
|
+ scope.$index +
|
|
|
|
|
+ 1
|
|
|
|
|
+ }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="证书类型" align="center" prop="type" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ getCertificateTypeText(scope.row.type) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="证书类别" align="center" width="150" prop="classify">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <dict-tag
|
|
|
|
|
+ v-if="scope.row.type === 'organization'"
|
|
|
|
|
+ :type="DICT_TYPE.ORG_CERT"
|
|
|
|
|
+ :value="scope.row.classify" />
|
|
|
|
|
+ <dict-tag v-else :type="DICT_TYPE.PERSON_CERT" :value="scope.row.classify" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="证书名称"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="certName"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ width="100" />
|
|
|
|
|
+ <el-table-column label="所属人" align="center" prop="userName" width="100" />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="所在部门"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="deptName"
|
|
|
|
|
+ width="100"
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="颁发机构"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="certOrg"
|
|
|
|
|
+ width="180"
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="证书标准"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="certStandard"
|
|
|
|
|
+ width="100"
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="颁发时间" align="center" prop="certIssue" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ formatDateCorrectly(scope.row.certIssue) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="有效期" align="center" prop="certExpire" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ formatDateCorrectly(scope.row.certExpire) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="certificate-pagination">
|
|
|
|
|
+ <Pagination
|
|
|
|
|
+ :total="certWarningTotal"
|
|
|
|
|
+ v-model:page="certWarningQueryParams.pageNo"
|
|
|
|
|
+ v-model:limit="certWarningQueryParams.pageSize"
|
|
|
|
|
+ @pagination="getCertificateWarningList" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@import url('@/styles/qhse_kb.scss');
|
|
@import url('@/styles/qhse_kb.scss');
|
|
|
|
|
|
|
|
:deep(.el-select__wrapper) {
|
|
:deep(.el-select__wrapper) {
|
|
|
- height: 38px !important;
|
|
|
|
|
|
|
+ // height: 38px !important;
|
|
|
font-size: 14px !important;
|
|
font-size: 14px !important;
|
|
|
}
|
|
}
|
|
|
.qhse-board {
|
|
.qhse-board {
|
|
@@ -1820,10 +1959,28 @@ onUnmounted(() => {
|
|
|
color: #516785;
|
|
color: #516785;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.qualification-item--clickable {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ transition:
|
|
|
|
|
+ transform 0.18s ease,
|
|
|
|
|
+ opacity 0.18s ease;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qualification-item--clickable:hover {
|
|
|
|
|
+ transform: translateX(4px);
|
|
|
|
|
+ opacity: 0.9;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.qualification-item strong {
|
|
.qualification-item strong {
|
|
|
font-size: 28px;
|
|
font-size: 28px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.certificate-warning-dialog {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 14px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.bottom-grid {
|
|
.bottom-grid {
|
|
|
display: grid;
|
|
display: grid;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
@@ -1968,7 +2125,7 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.certificate-pagination {
|
|
.certificate-pagination {
|
|
|
- padding-top: 14px;
|
|
|
|
|
|
|
+ padding-top: 0px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.production-brief-table {
|
|
.production-brief-table {
|