|
@@ -1000,6 +1000,21 @@ const dangerDialogQueryParams = reactive({
|
|
|
deptId: userStore.getUser.deptId
|
|
deptId: userStore.getUser.deptId
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const instrumentDialogVisible = ref(false)
|
|
|
|
|
+const instrumentDialogTitle = ref('')
|
|
|
|
|
+const instrumentDialogLoading = ref(false)
|
|
|
|
|
+const instrumentDialogList = ref<any[]>([])
|
|
|
|
|
+const instrumentDialogTotal = ref(0)
|
|
|
|
|
+const instrumentDialogQueryParams = reactive({
|
|
|
|
|
+ pageNo: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ measureName: undefined as string | undefined,
|
|
|
|
|
+ measureCertNo: undefined as string | undefined,
|
|
|
|
|
+ deptId: userStore.getUser.deptId,
|
|
|
|
|
+ expired: undefined as boolean | undefined,
|
|
|
|
|
+ alertWarn: undefined as boolean | undefined
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const getCertificateTypeText = (type: string) => {
|
|
const getCertificateTypeText = (type: string) => {
|
|
|
const map: Record<string, string> = {
|
|
const map: Record<string, string> = {
|
|
|
personal: '个人证书',
|
|
personal: '个人证书',
|
|
@@ -1112,6 +1127,17 @@ async function getDangerDialogList() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+async function getInstrumentDialogList() {
|
|
|
|
|
+ instrumentDialogLoading.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const data = await IotInstrumentApi.getInstrumentList(instrumentDialogQueryParams)
|
|
|
|
|
+ instrumentDialogList.value = data.list || []
|
|
|
|
|
+ instrumentDialogTotal.value = data.total || 0
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ instrumentDialogLoading.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function openHazardDialog(barLabel: string) {
|
|
function openHazardDialog(barLabel: string) {
|
|
|
hazardDialogQueryParams.pageNo = 1
|
|
hazardDialogQueryParams.pageNo = 1
|
|
|
hazardDialogQueryParams.pageSize = 10
|
|
hazardDialogQueryParams.pageSize = 10
|
|
@@ -1149,6 +1175,26 @@ function openDangerDialog(zone: { title?: string }) {
|
|
|
getDangerDialogList()
|
|
getDangerDialogList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function openInstrumentDialog(type: 'all' | 'expired') {
|
|
|
|
|
+ instrumentDialogQueryParams.pageNo = 1
|
|
|
|
|
+ instrumentDialogQueryParams.pageSize = 10
|
|
|
|
|
+ instrumentDialogQueryParams.measureName = undefined
|
|
|
|
|
+ instrumentDialogQueryParams.measureCertNo = undefined
|
|
|
|
|
+ instrumentDialogQueryParams.deptId = userStore.getUser.deptId
|
|
|
|
|
+ instrumentDialogQueryParams.alertWarn = undefined
|
|
|
|
|
+
|
|
|
|
|
+ if (type === 'expired') {
|
|
|
|
|
+ instrumentDialogTitle.value = '待检设备列表'
|
|
|
|
|
+ instrumentDialogQueryParams.expired = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ instrumentDialogTitle.value = '在用设备列表'
|
|
|
|
|
+ instrumentDialogQueryParams.expired = undefined
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ instrumentDialogVisible.value = true
|
|
|
|
|
+ getInstrumentDialogList()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function handleHazardBarClick(params: { name?: string }) {
|
|
function handleHazardBarClick(params: { name?: string }) {
|
|
|
if (!params?.name) return
|
|
if (!params?.name) return
|
|
|
openHazardDialog(params.name)
|
|
openHazardDialog(params.name)
|
|
@@ -1467,7 +1513,23 @@ onUnmounted(() => {
|
|
|
<div class="bottom-card__title">{{ card.title }}</div>
|
|
<div class="bottom-card__title">{{ card.title }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="bottom-card__content">
|
|
<div class="bottom-card__content">
|
|
|
- <p v-for="line in card.lines" :key="line">{{ line }}</p>
|
|
|
|
|
|
|
+ <template v-if="card.title === '安全检测'">
|
|
|
|
|
+ <button
|
|
|
|
|
+ type="button"
|
|
|
|
|
+ class="bottom-card__action"
|
|
|
|
|
+ @click="openInstrumentDialog('all')">
|
|
|
|
|
+ {{ card.lines[0] }}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button
|
|
|
|
|
+ type="button"
|
|
|
|
|
+ class="bottom-card__action"
|
|
|
|
|
+ @click="openInstrumentDialog('expired')">
|
|
|
|
|
+ {{ card.lines[1] }}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <p v-for="line in card.lines" :key="line">{{ line }}</p>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
</article>
|
|
</article>
|
|
|
</section>
|
|
</section>
|
|
@@ -1895,6 +1957,61 @@ onUnmounted(() => {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</Dialog>
|
|
</Dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <Dialog v-model="instrumentDialogVisible" :title="instrumentDialogTitle" width="1400px">
|
|
|
|
|
+ <div class="certificate-warning-dialog">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :loading="instrumentDialogLoading"
|
|
|
|
|
+ :data="instrumentDialogList"
|
|
|
|
|
+ :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">
|
|
|
|
|
+ {{
|
|
|
|
|
+ (instrumentDialogQueryParams.pageNo - 1) * instrumentDialogQueryParams.pageSize +
|
|
|
|
|
+ scope.$index +
|
|
|
|
|
+ 1
|
|
|
|
|
+ }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="名称" align="center" prop="measureName" min-width="140" />
|
|
|
|
|
+ <el-table-column label="编码" align="center" prop="measureCode" min-width="120" />
|
|
|
|
|
+ <el-table-column label="序列号" align="center" prop="serialNo" min-width="120" />
|
|
|
|
|
+ <el-table-column label="部门名称" align="center" prop="deptName" min-width="140" />
|
|
|
|
|
+ <el-table-column label="计量单位" align="center" prop="measureUnit" min-width="100" />
|
|
|
|
|
+ <el-table-column label="责任人" align="center" prop="dutyPerson" min-width="100" />
|
|
|
|
|
+ <el-table-column label="品牌" align="center" prop="brand" min-width="100" />
|
|
|
|
|
+ <el-table-column label="规格型号" align="center" prop="modelName" min-width="120" />
|
|
|
|
|
+ <el-table-column label="分类" align="center" min-width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <dict-tag :type="DICT_TYPE.MEASURE_TYPE" :value="scope.row.classify" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="采购日期" align="center" min-width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ formatDateCorrectly(scope.row.buyDate) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="价格" align="center" prop="measurePrice" min-width="100" />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="备注"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="remark"
|
|
|
|
|
+ min-width="140"
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="certificate-pagination">
|
|
|
|
|
+ <Pagination
|
|
|
|
|
+ :total="instrumentDialogTotal"
|
|
|
|
|
+ v-model:page="instrumentDialogQueryParams.pageNo"
|
|
|
|
|
+ v-model:limit="instrumentDialogQueryParams.pageSize"
|
|
|
|
|
+ @pagination="getInstrumentDialogList" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -1971,6 +2088,25 @@ onUnmounted(() => {
|
|
|
color: #5c7393;
|
|
color: #5c7393;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.bottom-card__action {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ color: #617491;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ transition: color 0.2s ease;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #5c7393;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.bottom-card__action:hover {
|
|
|
|
|
+ color: #2d78ea;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.risk-card--clickable {
|
|
.risk-card--clickable {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
transition:
|
|
transition:
|