| | |
| | | @pagination="paginationStd" |
| | | /> |
| | | </el-tab-pane> |
| | | |
| | | <!-- ==================== Tab4: ç³»ç»åæ° ==================== --> |
| | | <el-tab-pane label="ç³»ç»åæ°" name="setting"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">åç±»ï¼</span> |
| | | <el-select v-model="setSearch.category" style="width: 150px" placeholder="å
¨é¨" clearable @change="loadSetting"> |
| | | <el-option label="éé" value="collect" /><el-option label="æ¸
æ´" value="clean" /> |
| | | <el-option label="é¢è¦" value="alert" /><el-option label="å®å
¨" value="security" /> |
| | | <el-option label="æ ·å" value="sample" /><el-option label="è¯å" value="reagent" /><el-option label="çé¢" value="ui" /> |
| | | </el-select> |
| | | <span class="search_title" style="margin-left: 16px">åæ°åï¼</span> |
| | | <el-input v-model="setSearch.settingName" style="width: 180px" placeholder="请è¾å
¥" clearable @change="loadSetting" /> |
| | | <el-button type="primary" style="margin-left: 10px" @click="loadSetting">æç´¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="openSetForm('add')">æ°å¢åæ°</el-button> |
| | | <el-button @click="loadSetting">å·æ°</el-button> |
| | | </div> |
| | | </div> |
| | | <PIMTable rowKey="id" :column="setColumns" :tableData="setData" :page="setPage" |
| | | :tableLoading="setLoading" @pagination="paginationSet" /> |
| | | </el-tab-pane> |
| | | |
| | | <!-- ==================== Tab5: 审计æ¥å¿ ==================== --> |
| | | <el-tab-pane label="审计æ¥å¿" name="auditLog"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">模åï¼</span> |
| | | <el-input v-model="auditSearch.module" style="width: 150px" placeholder="å¦ æ ·å管ç" clearable @change="loadAudit" /> |
| | | <span class="search_title" style="margin-left: 16px">å¨ä½ï¼</span> |
| | | <el-select v-model="auditSearch.action" style="width: 150px" placeholder="å
¨é¨" clearable @change="loadAudit"> |
| | | <el-option label="æ°å¢" value="create" /><el-option label="ä¿®æ¹" value="update" /> |
| | | <el-option label="å é¤" value="delete" /><el-option label="åºåº" value="stock_out" /> |
| | | <el-option label="å
¥åº" value="stock_in" /><el-option label="åé
èµæº" value="assign_resource" /> |
| | | <el-option label="å¤çåè¦" value="handle_alert" /> |
| | | </el-select> |
| | | <span class="search_title" style="margin-left: 16px">æä½äººï¼</span> |
| | | <el-input v-model="auditSearch.operator" style="width: 140px" placeholder="请è¾å
¥" clearable @change="loadAudit" /> |
| | | <el-button type="primary" style="margin-left: 10px" @click="loadAudit">æç´¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="loadAudit">å·æ°</el-button> |
| | | </div> |
| | | </div> |
| | | <PIMTable rowKey="id" :column="auditColumns" :tableData="auditData" :page="auditPage" |
| | | :tableLoading="auditLoading" @pagination="paginationAudit" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | <!-- ==================== æ£æµé¡¹ç®è¡¨å ==================== --> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | <!-- ===== ç³»ç»åæ°ç¼è¾ ===== --> |
| | | <el-dialog v-model="setDialogVisible" :title="setOpType === 'add' ? 'æ°å¢åæ°' : 'ç¼è¾åæ°'" width="600px"> |
| | | <el-form :model="setForm" label-position="top"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="12"><el-form-item label="åç±»"><el-input v-model="setForm.category" placeholder="collect/clean/alert/security" /></el-form-item></el-col> |
| | | <el-col :span="12"><el-form-item label="åæ°é®"><el-input v-model="setForm.settingKey" /></el-form-item></el-col> |
| | | <el-col :span="12"><el-form-item label="åæ°å"><el-input v-model="setForm.settingName" /></el-form-item></el-col> |
| | | <el-col :span="12"><el-form-item label="åæ°å¼"><el-input v-model="setForm.settingValue" /></el-form-item></el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¼ç±»å"> |
| | | <el-select v-model="setForm.valueType" style="width: 100%"> |
| | | <el-option label="å符串" value="string" /><el-option label="æ°å" value="number" /> |
| | | <el-option label="å¸å°" value="boolean" /><el-option label="䏿" value="select" /> |
| | | <el-option label="JSON" value="json" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"><el-form-item label="é»è®¤å¼"><el-input v-model="setForm.defaultValue" /></el-form-item></el-col> |
| | | <el-col :span="24"><el-form-item label="说æ"><el-input v-model="setForm.description" type="textarea" :rows="2" /></el-form-item></el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="setDialogVisible = false">åæ¶</el-button> |
| | | <el-button type="primary" @click="submitSet">ç¡®å®</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import { |
| | | listJudgmentStandard, getJudgmentStandard, addJudgmentStandard, updateJudgmentStandard, delJudgmentStandard, |
| | | } from "@/api/lims/judgmentStandard"; |
| | | import { listSetting, getSetting, addSetting, updateSetting, delSetting } from "@/api/lims/setting"; |
| | | import { listAuditLog } from "@/api/lims/auditLog"; |
| | | |
| | | const activeTab = ref("testItem"); |
| | | const itemOptions = ref([]); |
| | |
| | | doDelStd(ids); |
| | | }; |
| | | |
| | | // ==================== ⨠系ç»åæ° ==================== |
| | | const setSearch = ref({}); |
| | | const setData = ref([]); |
| | | const setLoading = ref(false); |
| | | const setPage = reactive({ pageNum: 1, pageSize: 10, total: 0 }); |
| | | const setColumns = ref([ |
| | | { label: "åç±»", prop: "category", width: 100 }, |
| | | { label: "åæ°é®", prop: "settingKey", width: 220 }, |
| | | { label: "åæ°å", prop: "settingName", width: 160 }, |
| | | { label: "å½åå¼", prop: "settingValue", width: 140 }, |
| | | { label: "é»è®¤å¼", prop: "defaultValue", width: 110 }, |
| | | { label: "说æ", prop: "description", showOverflowTooltip: true }, |
| | | { |
| | | dataType: "action", label: "æä½", align: "center", fixed: "right", width: 100, |
| | | operation: [{ name: "ç¼è¾", type: "text", clickFun: (row) => openSetForm("edit", row) }], |
| | | }, |
| | | ]); |
| | | const loadSetting = () => { |
| | | setLoading.value = true; |
| | | listSetting({ ...setSearch.value, ...setPage }).then((res) => { |
| | | setLoading.value = false; |
| | | setData.value = res.data.records || []; |
| | | setPage.total = res.data.total || 0; |
| | | }).catch(() => (setLoading.value = false)); |
| | | }; |
| | | const paginationSet = (p) => { setPage.pageNum = p.pageNum; setPage.pageSize = p.pageSize; loadSetting(); }; |
| | | const setDialogVisible = ref(false); |
| | | const setOpType = ref("add"); |
| | | const setForm = ref({}); |
| | | const openSetForm = (type, row) => { |
| | | setOpType.value = type; |
| | | setForm.value = type === "edit" ? { ...row } : { valueType: "string", editable: "1", sortNo: 100 }; |
| | | setDialogVisible.value = true; |
| | | }; |
| | | const submitSet = () => { |
| | | const fn = setOpType.value === "add" ? addSetting : updateSetting; |
| | | fn(setForm.value).then(() => { |
| | | ElMessage.success("ä¿åæå"); |
| | | setDialogVisible.value = false; |
| | | loadSetting(); |
| | | }); |
| | | }; |
| | | |
| | | // ==================== ⧠审计æ¥å¿ ==================== |
| | | const auditSearch = ref({}); |
| | | const auditData = ref([]); |
| | | const auditLoading = ref(false); |
| | | const auditPage = reactive({ pageNum: 1, pageSize: 20, total: 0 }); |
| | | const auditColumns = ref([ |
| | | { label: "æ¶é´", prop: "operateTime", width: 160 }, |
| | | { label: "模å", prop: "module", width: 110 }, |
| | | { label: "å¨ä½", prop: "action", width: 130 }, |
| | | { label: "ä¸å¡ç¼å·", prop: "bizCode", width: 140 }, |
| | | { label: "说æ", prop: "description", showOverflowTooltip: true }, |
| | | { label: "åæ®µ", prop: "fieldName", width: 100 }, |
| | | { label: "æ§å¼", prop: "oldValue", width: 100 }, |
| | | { label: "æ°å¼", prop: "newValue", width: 100 }, |
| | | { label: "æä½äºº", prop: "operator", width: 100 }, |
| | | { label: "IP", prop: "operatorIp", width: 130 }, |
| | | { label: "ç»æ", prop: "execResult", width: 80 }, |
| | | ]); |
| | | const loadAudit = () => { |
| | | auditLoading.value = true; |
| | | listAuditLog({ ...auditSearch.value, ...auditPage }).then((res) => { |
| | | auditLoading.value = false; |
| | | auditData.value = res.data.records || []; |
| | | auditPage.total = res.data.total || 0; |
| | | }).catch(() => (auditLoading.value = false)); |
| | | }; |
| | | const paginationAudit = (p) => { auditPage.pageNum = p.pageNum; auditPage.pageSize = p.pageSize; loadAudit(); }; |
| | | |
| | | onMounted(() => { |
| | | loadSetting(); |
| | | loadAudit(); |
| | | loadItem(); |
| | | loadItemOptions(); |
| | | loadUnit(); |