Merge branch 'dev_tide_gybjyhglxt' into dev_tide_gybjyhglxt_xindao
# Conflicts:
# src/store/modules/user.js
# vite.config.js
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" label-width="100px" :rules="formRules" ref="formRef"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§ååç§°" prop="deviceName"> |
| | | <el-input v-model="form.deviceName" placeholder="请è¾å
¥è§ååç§°" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç±»å" prop="deviceModel"> |
| | | <el-input v-model="form.deviceModel" placeholder="请è¾å
¥è®¾å¤ç±»å" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§åæ°" prop="supplierName"> |
| | | <el-input v-model="form.supplierName" placeholder="请è¾å
¥çæ§åæ°" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥è¦çº§å«" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥æ¥è¦çº§å«" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦å¯ç¨" prop="status"> |
| | | <el-switch |
| | | v-model="form.status" |
| | | :active-value="1" |
| | | :inactive-value="0" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå»ºæ¥æ" prop="createTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.createTime" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | type="date" |
| | | placeholder="è¯·éæ©å½å
¥æ¥æ" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import useFormData from "@/hooks/useFormData.js"; |
| | | // import useUserStore from "@/store/modules/user"; |
| | | import { getLedgerById } from "@/api/equipmentManagement/ledger.js"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | calculateTaxIncludeTotalPrice, |
| | | calculateTaxExclusiveTotalPrice, |
| | | } from "@/utils/summarizeTable.js"; |
| | | import { ElMessage } from "element-plus"; |
| | | import {ref} from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "设å¤å°è´¦è¡¨å", |
| | | }); |
| | | const formRef = ref(null); |
| | | const operationType = ref(''); |
| | | const formRules = { |
| | | deviceName: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | deviceModel: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | supplierName: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | unit: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | taxRate: [{ required: true, trigger: "change", message: "è¯·éæ©" }], |
| | | } |
| | | |
| | | const { form, resetForm } = useFormData({ |
| | | deviceName: undefined, // 设å¤åç§° |
| | | deviceModel: undefined, // è§æ ¼åå· |
| | | deviceBrand: undefined, // 设å¤åç |
| | | supplierName: undefined, // ä¾åºå |
| | | storageLocation: undefined, // åæ¾ä½ç½® |
| | | enableDepreciation: false, // æ¯å¦å¯ç¨ææ§ |
| | | unit: undefined, // åä½ |
| | | number: 1, // æ°é |
| | | taxIncludingPriceUnit: undefined, // å«ç¨åä»· |
| | | taxIncludingPriceTotal: undefined, // å«ç¨æ»ä»· |
| | | taxRate: undefined, // ç¨ç |
| | | unTaxIncludingPriceTotal: undefined, // ä¸å«ç¨æ»ä»· |
| | | // createUser: useUserStore().nickName, // å½å
¥äºº |
| | | createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), // å½å
¥æ¥æ |
| | | planRuntimeTime: dayjs().format("YYYY-MM-DD"), // å½å
¥æ¥æ |
| | | }); |
| | | |
| | | const loadForm = async (id) => { |
| | | if (id) { |
| | | operationType.value = 'edit' |
| | | } |
| | | const { code, data } = await getLedgerById(id); |
| | | if (code == 200) { |
| | | form.deviceName = data.deviceName; |
| | | form.deviceModel = data.deviceModel; |
| | | form.deviceBrand = data.deviceBrand; |
| | | form.supplierName = data.supplierName; |
| | | form.storageLocation = data.storageLocation; |
| | | form.enableDepreciation = data.enableDepreciation; |
| | | form.unit = data.unit; |
| | | form.number = 1; |
| | | form.taxIncludingPriceUnit = data.taxIncludingPriceUnit; |
| | | form.taxIncludingPriceTotal = data.taxIncludingPriceTotal; |
| | | form.taxRate = data.taxRate; |
| | | form.unTaxIncludingPriceTotal = data.unTaxIncludingPriceTotal; |
| | | form.createTime = data.createTime; |
| | | } |
| | | }; |
| | | |
| | | const mathNum = () => { |
| | | if (!form.taxIncludingPriceUnit) { |
| | | ElMessage.error("请è¾å
¥åä»·"); |
| | | return; |
| | | } |
| | | form.taxIncludingPriceTotal = calculateTaxIncludeTotalPrice( |
| | | form.taxIncludingPriceUnit, |
| | | form.number |
| | | ); |
| | | if (form.taxRate) { |
| | | form.unTaxIncludingPriceTotal = calculateTaxExclusiveTotalPrice( |
| | | form.taxIncludingPriceTotal, |
| | | form.taxRate |
| | | ); |
| | | } |
| | | }; |
| | | |
| | | // æ¸
é¤è¡¨åæ ¡éªç¶æ |
| | | const clearValidate = () => { |
| | | formRef.value?.clearValidate(); |
| | | }; |
| | | |
| | | // éç½®è¡¨åæ°æ®åæ ¡éªç¶æ |
| | | const resetFormAndValidate = () => { |
| | | resetForm(); |
| | | clearValidate(); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | form, |
| | | loadForm, |
| | | resetForm, |
| | | clearValidate, |
| | | resetFormAndValidate, |
| | | formRef, |
| | | }); |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="modalOptions.title" v-model="visible" @close="close"> |
| | | <Form ref="formRef"></Form> |
| | | <template #footer> |
| | | <el-button type="primary" @click="sendForm" :loading="loading"> |
| | | {{ modalOptions.confirmText }} |
| | | </el-button> |
| | | <el-button @click="closeModal">{{ modalOptions.cancelText }}</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { useModal } from "@/hooks/useModal.js"; |
| | | import { addLedger, editLedger } from "@/api/equipmentManagement/ledger.js"; |
| | | import Form from "./Form.vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | defineOptions({ |
| | | name: "设å¤å°è´¦æ°å¢ç¼è¾", |
| | | }); |
| | | |
| | | const emits = defineEmits(["success"]); |
| | | |
| | | const formRef = ref(); |
| | | const { |
| | | id, |
| | | visible, |
| | | loading, |
| | | openModal, |
| | | modalOptions, |
| | | handleConfirm, |
| | | closeModal, |
| | | } = useModal({ title: "设å¤å°è´¦" }); |
| | | |
| | | const sendForm = () => { |
| | | proxy.$refs.formRef.$refs.formRef.validate(async valid => { |
| | | if (valid) { |
| | | const {code} = id.value |
| | | ? await editLedger({id: id.value, ...formRef.value.form}) |
| | | : await addLedger(formRef.value.form); |
| | | if (code == 200) { |
| | | emits("success"); |
| | | ElMessage({message: "æä½æå", type: "success"}); |
| | | close(); |
| | | } else { |
| | | loading.value = false; |
| | | } |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | const close = () => { |
| | | formRef.value.resetFormAndValidate(); |
| | | closeModal(); |
| | | }; |
| | | |
| | | const loadForm = async (id) => { |
| | | openModal(id); |
| | | await nextTick(); |
| | | formRef.value.loadForm(id); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openModal, |
| | | loadForm, |
| | | }); |
| | | </script> |
| | |
| | | <template> |
| | | <div class="alarm-rule-config"> |
| | | <el-card shadow="never" class="search-card"> |
| | | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
| | | <el-form-item label="è§ååç§°"> |
| | | <el-input v-model="searchForm.ruleName" placeholder="请è¾å
¥è§ååç§°" /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç±»å"> |
| | | <el-select v-model="searchForm.equipmentType" placeholder="è¯·éæ©è®¾å¤ç±»å"> |
| | | <el-option label="å·¥èºè®¾å¤" value="å·¥èºè®¾å¤" /> |
| | | <el-option label="æ£æµè®¾å¤" value="æ£æµè®¾å¤" /> |
| | | <el-option label="å
¶ä»è®¾å¤" value="å
¶ä»è®¾å¤" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" @click="handleReset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card shadow="never" class="table-card"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>æ¥è¦è§åé
ç½®</span> |
| | | <el-button type="primary" icon="el-icon-plus" @click="handleAdd">æ°å¢è§å</el-button> |
| | | </div> |
| | | </template> |
| | | <el-table :data="ruleList" style="width: 100%" :header-cell-style="{textAlign: 'center'}" :cell-style="{textAlign: 'center'}"> |
| | | <el-table-column type="index" label="åºå·" width="80" /> |
| | | <el-table-column prop="ruleName" label="è§ååç§°" /> |
| | | <el-table-column prop="equipmentType" label="设å¤ç±»å" /> |
| | | <el-table-column prop="parameter" label="çæ§åæ°" /> |
| | | <el-table-column prop="alarmLevel" label="æ¥è¦çº§å«" /> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" width="180" show-overflow-tooltip/> |
| | | <el-table-column prop="status" label="ç¶æ" width="150"> |
| | | <template #default="scope"> |
| | | <el-switch v-model="scope.row.status" active-text="å¯ç¨" inactive-text="ç¦ç¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="150" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="small" type="text" @click="handleEdit(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="ruleList.length" |
| | | :page-size="10" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | <div class="app-container"> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form-item label="è§ååç§°"> |
| | | <el-input |
| | | v-model="filters.deviceName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥è§ååç§°" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç±»å"> |
| | | <el-input |
| | | v-model="filters.deviceModel" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥è®¾å¤ç±»å" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ§åæ°"> |
| | | <el-input |
| | | v-model="filters.supplierName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥çæ§åæ°" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="table_list"> |
| | | <div class="actions"> |
| | | <div></div> |
| | | <div> |
| | | <el-button type="primary" @click="add" icon="Plus"> æ°å¢ </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="Delete" |
| | | :disabled="multipleList.length <= 0" |
| | | @click="deleteRow(multipleList.map((item) => item.id))" |
| | | > |
| | | æ¹éå é¤ |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | <PIMTable |
| | | rowKey="id" |
| | | isSelection |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :page="{ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | total: pagination.total, |
| | | }" |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="changePage" |
| | | > |
| | | </PIMTable> |
| | | </div> |
| | | <Modal ref="modalRef" @success="getTableData"></Modal> |
| | | <el-dialog v-model="qrDialogVisible" title="äºç»´ç " width="300px"> |
| | | <div style="text-align:center;"> |
| | | <img :src="qrCodeUrl" alt="äºç»´ç " style="width:200px;height:200px;" /> |
| | | <div style="margin:10px 0;"> |
| | | <el-button type="primary" @click="downloadQRCode">ä¸è½½äºç»´ç å¾ç</el-button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'AlarmRule', |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | ruleName: '', |
| | | equipmentType: '' |
| | | }, |
| | | ruleList: [ |
| | | { |
| | | id: 1, |
| | | ruleName: '温度è¿é«æ¥è¦', |
| | | equipmentType: 'å·¥èºè®¾å¤', |
| | | parameter: '温度', |
| | | alarmLevel: '严é', |
| | | createTime: '2025-12-01 10:30:00', |
| | | status: true |
| | | }, |
| | | { |
| | | id: 2, |
| | | ruleName: 'ååå¼å¸¸æ¥è¦', |
| | | equipmentType: 'å·¥èºè®¾å¤', |
| | | parameter: 'åå', |
| | | alarmLevel: 'ä¸ç', |
| | | createTime: '2025-12-02 14:20:00', |
| | | status: true |
| | | }, |
| | | { |
| | | id: 3, |
| | | ruleName: 'æµéè¿ä½æ¥è¦', |
| | | equipmentType: 'æ£æµè®¾å¤', |
| | | parameter: 'æµé', |
| | | alarmLevel: '轻微', |
| | | createTime: '2025-12-03 09:15:00', |
| | | status: false |
| | | }, |
| | | { |
| | | id: 4, |
| | | ruleName: 'çµåä¸ç¨³å®æ¥è¦', |
| | | equipmentType: 'å
¶ä»è®¾å¤', |
| | | parameter: 'çµå', |
| | | alarmLevel: 'ä¸ç', |
| | | createTime: '2025-12-04 16:45:00', |
| | | status: true |
| | | }, |
| | | { |
| | | id: 5, |
| | | ruleName: 'æ¶²ä½å¼å¸¸æ¥è¦', |
| | | equipmentType: 'å·¥èºè®¾å¤', |
| | | parameter: 'æ¶²ä½', |
| | | alarmLevel: '严é', |
| | | createTime: '2025-12-05 11:20:00', |
| | | status: true |
| | | } |
| | | ] |
| | | } |
| | | <script setup> |
| | | import { usePaginationApi } from "../../../hooks/usePaginationApi.jsx"; |
| | | import { getLedgerPage, delLedger } from "../../..//api/equipmentManagement/ledger.js"; |
| | | import { onMounted, getCurrentInstance } from "vue"; |
| | | import Modal from "./Modal.vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { ref } from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "设å¤å°è´¦", |
| | | }); |
| | | |
| | | // è¡¨æ ¼å¤éæ¡éä¸é¡¹ |
| | | const multipleList = ref([]); |
| | | const { proxy } = getCurrentInstance(); |
| | | const modalRef = ref(); |
| | | const qrDialogVisible = ref(false); |
| | | const qrCodeUrl = ref(""); |
| | | const qrRowData = ref(null); |
| | | |
| | | const { |
| | | filters, |
| | | columns, |
| | | dataList, |
| | | pagination, |
| | | getTableData, |
| | | resetFilters, |
| | | onCurrentChange, |
| | | } = usePaginationApi( |
| | | getLedgerPage, |
| | | { |
| | | deviceName: undefined, |
| | | deviceModel: undefined, |
| | | supplierName: undefined, |
| | | unit: undefined, |
| | | entryDateStart: undefined, |
| | | entryDateEnd: undefined, |
| | | }, |
| | | methods: { |
| | | handleSearch() { |
| | | console.log('æç´¢', this.searchForm) |
| | | [ |
| | | { |
| | | label: "è§ååç§°", |
| | | align: "center", |
| | | prop: "deviceName", |
| | | }, |
| | | handleReset() { |
| | | this.searchForm = { |
| | | ruleName: '', |
| | | equipmentType: '' |
| | | } |
| | | { |
| | | label: "设å¤ç±»å", |
| | | align: "center", |
| | | prop: "deviceModel", |
| | | }, |
| | | handleAdd() { |
| | | console.log('æ°å¢è§å') |
| | | { |
| | | label: "çæ§åæ°", |
| | | align: "center", |
| | | prop: "supplierName", |
| | | }, |
| | | handleEdit(row) { |
| | | console.log('ç¼è¾è§å', row) |
| | | { |
| | | label: "æ¥è¦çº§å«", |
| | | align: "center", |
| | | prop: "unit", |
| | | }, |
| | | handleDelete(row) { |
| | | console.log('å é¤è§å', row) |
| | | { |
| | | label: "å建æ¶é´", |
| | | align: "center", |
| | | prop: "createTime", |
| | | }, |
| | | { |
| | | label: "æ¯å¦å¯ç¨", |
| | | align: "center", |
| | | prop: "status", |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: 'right', |
| | | width: 150, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | edit(row.id) |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | ); |
| | | |
| | | // å¤éååä»ä¹ |
| | | const handleSelectionChange = (selectionList) => { |
| | | multipleList.value = selectionList; |
| | | }; |
| | | |
| | | const add = () => { |
| | | modalRef.value.openModal(); |
| | | }; |
| | | const edit = (id) => { |
| | | modalRef.value.loadForm(id); |
| | | }; |
| | | const changePage = ({ page, limit }) => { |
| | | pagination.currentPage = page; |
| | | pagination.pageSize = limit; |
| | | onCurrentChange(page); |
| | | }; |
| | | const deleteRow = (id) => { |
| | | ElMessageBox.confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(async () => { |
| | | const { code } = await delLedger(id); |
| | | if (code == 200) { |
| | | ElMessage({ |
| | | type: "success", |
| | | message: "å 餿å", |
| | | }); |
| | | getTableData(); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | filters.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | filters.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | } else { |
| | | filters.entryDateStart = undefined; |
| | | filters.entryDateEnd = undefined; |
| | | } |
| | | } |
| | | getTableData(); |
| | | }; |
| | | |
| | | |
| | | onMounted(() => { |
| | | getTableData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .alarm-rule-config { |
| | | padding: 16px; |
| | | background-color: #f0f2f5; |
| | | min-height: 100vh; |
| | | <style lang="scss" scoped> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | |
| | | .search-card { |
| | | margin-bottom: 16px; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .table-card { |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .card-header { |
| | | .actions { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .pagination { |
| | | margin-top: 16px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding-right: 20px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div class="alarm-handle-knowledge"> |
| | | <el-card shadow="never" class="search-card"> |
| | | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
| | | <el-form-item label="ç¥è¯åºæ é¢"> |
| | | <el-input v-model="searchForm.title" placeholder="请è¾å
¥ç¥è¯åºæ é¢" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¦ç±»å"> |
| | | <el-select v-model="searchForm.alarmType" placeholder="è¯·éæ©æ¥è¦ç±»å" clearable> |
| | | <el-option label="温度æ¥è¦" value="温度æ¥è¦" /> |
| | | <el-option label="å忥è¦" value="å忥è¦" /> |
| | | <el-option label="æ¯å¨æ¥è¦" value="æ¯å¨æ¥è¦" /> |
| | | <el-option label="æ¶²ä½æ¥è¦" value="æ¶²ä½æ¥è¦" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">æç´¢</el-button> |
| | | <el-button icon="el-icon-plus" @click="handleAdd">æ°å¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card shadow="never" class="table-card" > |
| | | <el-table :data="knowledgeList" style="width: 100%" :header-cell-style="{textAlign: 'center'}" :cell-style="{textAlign: 'center'}"> |
| | | <el-table-column type="index" label="åºå·" width="80" /> |
| | | <el-table-column prop="title" label="ç¥è¯åºæ é¢" min-width="200" /> |
| | | <el-table-column prop="alarmType" label="æ¥è¦ç±»å" width="120" /> |
| | | <el-table-column prop="alarmLevel" label="æ¥è¦çº§å«" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getAlarmLevelType(scope.row.alarmLevel)"> |
| | | {{ scope.row.alarmLevel }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" width="180" /> |
| | | <el-table-column prop="creator" label="å建人" width="100" /> |
| | | <el-table-column prop="status" label="ç¶æ" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.status === 'å¯ç¨' ? 'success' : 'info'"> |
| | | {{ scope.row.status }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="250" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="small" type="text" icon="el-icon-view" @click="handleView(scope.row)">æ¥ç</el-button> |
| | | <el-button size="small" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="knowledgeList.length" |
| | | :page-size="10" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">ç¥è¯åºæ é¢ï¼</span> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | | > |
| | | </div> |
| | | </el-card> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢ç¥è¯åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | </div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | :title="operationType === 'add' ? 'æ°å¢ç¥è¯åº' : 'ç¼è¾ç¥è¯åº'" |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <el-form |
| | | :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | ref="formRef" |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¥è¯åºæ é¢ï¼" prop="customerName"> |
| | | <el-input |
| | | v-model="form.customerName" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | label="æ¥è¦ç±»åï¼" |
| | | prop="taxpayerIdentificationNumber" |
| | | > |
| | | <el-input |
| | | v-model="form.taxpayerIdentificationNumber" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥è¦çº§å«ï¼" prop="companyAddress"> |
| | | <el-select |
| | | v-model="form.companyAddress" |
| | | placeholder="è¯·éæ©æ¥è¦çº§å«" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="ä¸è¬" value="ä¸è¬" /> |
| | | <el-option label="轻微" value="轻微" /> |
| | | <el-option label="严é" value="严é" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è系人ï¼" prop="companyPhone"> |
| | | <el-input v-model="form.companyPhone" placeholder="请è¾å
¥" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- ç¨æ·å¯¼å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | :title="upload.title" |
| | | v-model="upload.open" |
| | | width="400px" |
| | | append-to-body |
| | | > |
| | | <el-upload |
| | | ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :before-upload="upload.beforeUpload" |
| | | :on-progress="upload.onProgress" |
| | | :on-success="upload.onSuccess" |
| | | :on-error="upload.onError" |
| | | :on-change="upload.onChange" |
| | | :auto-upload="false" |
| | | drag |
| | | > |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã</span> |
| | | <el-link |
| | | type="primary" |
| | | :underline="false" |
| | | style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate" |
| | | >ä¸è½½æ¨¡æ¿</el-link |
| | | > |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="upload.open = false">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'AlarmHandleKnowledge', |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | title: '', |
| | | alarmType: '' |
| | | }, |
| | | knowledgeList: [ |
| | | { |
| | | id: 1, |
| | | title: 'ååºé温度è¿é«æ¥è¦å¤çæµç¨', |
| | | alarmType: '温度æ¥è¦', |
| | | alarmLevel: '严é', |
| | | createTime: '2025-12-01 14:30:00', |
| | | creator: '管çå', |
| | | status: 'å¯ç¨' |
| | | }, |
| | | { |
| | | id: 2, |
| | | title: 'ç¦»å¿æ³µæ¯å¨å¼å¸¸æ¥è¦å¤çæå', |
| | | alarmType: 'æ¯å¨æ¥è¦', |
| | | alarmLevel: 'ä¸ç', |
| | | createTime: '2025-12-02 09:15:00', |
| | | creator: '设å¤å·¥ç¨å¸', |
| | | status: 'å¯ç¨' |
| | | }, |
| | | { |
| | | id: 3, |
| | | title: 'å¨ç½æ¶²ä½è¿ä½æ¥è¦å¤çæ¹æ³', |
| | | alarmType: 'æ¶²ä½æ¥è¦', |
| | | alarmLevel: '轻微', |
| | | createTime: '2025-12-03 16:45:00', |
| | | creator: 'å·¥èºå·¥ç¨å¸', |
| | | status: 'å¯ç¨' |
| | | }, |
| | | { |
| | | id: 4, |
| | | title: 'å缩æºååè¿é«æ¥è¦åºæ¥é¢æ¡', |
| | | alarmType: 'å忥è¦', |
| | | alarmLevel: '严é', |
| | | createTime: '2025-12-04 11:20:00', |
| | | creator: 'å®å
¨ä¸»ç®¡', |
| | | status: 'å¯ç¨' |
| | | }, |
| | | { |
| | | id: 5, |
| | | title: 'å¹²ç¥æºæ¹¿åº¦å¼å¸¸æ¥è¦å¤çæµç¨', |
| | | alarmType: '湿度æ¥è¦', |
| | | alarmLevel: 'ä¸ç', |
| | | createTime: '2025-12-05 15:10:00', |
| | | creator: 'å·¥èºå·¥ç¨å¸', |
| | | status: 'ç¦ç¨' |
| | | } |
| | | ] |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { |
| | | addCustomer, |
| | | delCustomer, |
| | | getCustomer, |
| | | listCustomer, |
| | | updateCustomer, |
| | | } from "@/api/basicData/customerFile.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ç¥è¯åºæ é¢", |
| | | prop: "customerName", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "æ¥è¦ç±»å", |
| | | prop: "taxpayerIdentificationNumber", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "æ¥è¦çº§å«", |
| | | prop: "companyAddress", |
| | | width: 250, |
| | | formatter: (row, column, cellValue) => { |
| | | const levelMap = { |
| | | 'ä¸è¬': 'ä¸è¬', |
| | | '轻微': '轻微', |
| | | '严é': '严é' |
| | | }; |
| | | return levelMap[cellValue] || cellValue; |
| | | } |
| | | }, |
| | | methods: { |
| | | getAlarmLevelType(level) { |
| | | switch (level) { |
| | | case '严é': |
| | | return 'danger' |
| | | case 'ä¸ç': |
| | | return 'warning' |
| | | case '轻微': |
| | | return 'info' |
| | | default: |
| | | return 'info' |
| | | } |
| | | }, |
| | | handleSearch() { |
| | | console.log('æç´¢ç¥è¯åº', this.searchForm) |
| | | }, |
| | | handleAdd() { |
| | | console.log('æ°å¢ç¥è¯åº') |
| | | }, |
| | | handleView(row) { |
| | | console.log('æ¥çç¥è¯åºè¯¦æ
', row) |
| | | }, |
| | | handleEdit(row) { |
| | | console.log('ç¼è¾ç¥è¯åº', row) |
| | | }, |
| | | handleDelete(row) { |
| | | console.log('å é¤ç¥è¯åº', row) |
| | | { |
| | | label: "è系人", |
| | | prop: "companyPhone", |
| | | }, |
| | | { |
| | | label: "å建æ¶é´", |
| | | prop: "maintenanceTime", |
| | | width: 100, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const userList = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const total = ref(0); |
| | | |
| | | // ç¨æ·ä¿¡æ¯è¡¨åå¼¹æ¡æ°æ® |
| | | const operationType = ref(""); |
| | | const dialogFormVisible = ref(false); |
| | | const formYYs = ref({ // å
¶ä»å段... |
| | | contactList: [ |
| | | { |
| | | contactPerson: "", |
| | | contactPhone: "" |
| | | } |
| | | ] |
| | | }); |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | }, |
| | | form: { |
| | | customerName: "", |
| | | taxpayerIdentificationNumber: "", |
| | | companyAddress: "", |
| | | addressPhone: "", |
| | | contactPerson: "", |
| | | contactPhone: "", |
| | | maintainer: "", |
| | | maintenanceTime: "", |
| | | basicBankAccount: "", |
| | | bankAccount: "", |
| | | bankCode: "", |
| | | }, |
| | | rules: { |
| | | customerName: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | taxpayerIdentificationNumber: [ |
| | | { required: true, message: "请è¾å
¥", trigger: "blur" }, |
| | | ], |
| | | companyAddress: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | companyPhone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | // contactPerson: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | // contactPhone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | maintainer: [{ required: false, message: "è¯·éæ©", trigger: "change" }], |
| | | maintenanceTime: [ |
| | | { required: false, message: "è¯·éæ©", trigger: "change" }, |
| | | ], |
| | | basicBankAccount: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | bankAccount: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | bankCode: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | }, |
| | | }); |
| | | const upload = reactive({ |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå±ï¼å®¢æ·å¯¼å
¥ï¼ |
| | | open: false, |
| | | // å¼¹åºå±æ é¢ï¼å®¢æ·å¯¼å
¥ï¼ |
| | | title: "", |
| | | // æ¯å¦ç¦ç¨ä¸ä¼ |
| | | isUploading: false, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // ä¸ä¼ çå°å |
| | | url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData", |
| | | // æä»¶ä¸ä¼ åçåè° |
| | | beforeUpload: (file) => { |
| | | console.log('æä»¶å³å°ä¸ä¼ ', file); |
| | | // å¯ä»¥å¨æ¤å¤åæä»¶ç±»åæå¤§å°æ ¡éª |
| | | const isValid = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.name.endsWith('.xlsx') || file.name.endsWith('.xls'); |
| | | if (!isValid) { |
| | | proxy.$modal.msgError("åªè½ä¸ä¼ Excel æä»¶"); |
| | | } |
| | | return isValid; |
| | | }, |
| | | // æä»¶ç¶ææ¹åæ¶çåè° |
| | | onChange: (file, fileList) => { |
| | | console.log('æä»¶ç¶ææ¹å', file, fileList); |
| | | }, |
| | | // æä»¶ä¸ä¼ æåæ¶çåè° |
| | | onSuccess: (response, file, fileList) => { |
| | | console.log('ä¸ä¼ æå', response, file, fileList); |
| | | upload.isUploading = false; |
| | | if(response.code === 200){ |
| | | proxy.$modal.msgSuccess("æä»¶ä¸ä¼ æå"); |
| | | upload.open = false; |
| | | proxy.$refs["uploadRef"].clearFiles(); |
| | | getList(); |
| | | }else if(response.code === 500){ |
| | | proxy.$modal.msgError(response.msg); |
| | | }else{ |
| | | proxy.$modal.msgWarning(response.msg); |
| | | } |
| | | }, |
| | | // æä»¶ä¸ä¼ 失败æ¶çåè° |
| | | onError: (error, file, fileList) => { |
| | | console.error('ä¸ä¼ 失败', error, file, fileList); |
| | | upload.isUploading = false; |
| | | proxy.$modal.msgError("æä»¶ä¸ä¼ 失败"); |
| | | }, |
| | | // æä»¶ä¸ä¼ è¿åº¦åè° |
| | | onProgress: (event, file, fileList) => { |
| | | console.log('ä¸ä¼ ä¸...', event.percent); |
| | | } |
| | | }); |
| | | const { searchForm, form, rules } = toRefs(data); |
| | | const addNewContact = () => { |
| | | formYYs.value.contactList.push({ |
| | | contactPerson: "", |
| | | contactPhone: "" |
| | | }); |
| | | }; |
| | | |
| | | const removeContact = (index) => { |
| | | if (formYYs.value.contactList.length > 1) { |
| | | formYYs.value.contactList.splice(index, 1); |
| | | } |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | listCustomer({ ...searchForm.value, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | page.total = res.total; |
| | | }); |
| | | }; |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | /** æäº¤ä¸ä¼ æä»¶ */ |
| | | function submitFileForm() { |
| | | upload.isUploading = true; |
| | | proxy.$refs["uploadRef"].submit(); |
| | | } |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "客æ·å¯¼å
¥"; |
| | | upload.open = true; |
| | | } |
| | | /** ä¸è½½æ¨¡æ¿ */ |
| | | function importTemplate() { |
| | | proxy.download("/basic/customer/downloadTemplate", {}, "客æ·å¯¼å
¥æ¨¡æ¿.xlsx"); |
| | | } |
| | | // æå¼å¼¹æ¡ |
| | | const openForm = (type, row) => { |
| | | operationType.value = type; |
| | | form.value = {}; |
| | | form.value.maintainer = userStore.nickName; |
| | | formYYs.value.contactList = [ |
| | | { |
| | | contactPerson: "", |
| | | contactPhone: "" |
| | | } |
| | | ]; |
| | | form.value.maintenanceTime = getCurrentDate(); |
| | | userListNoPage().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | if (type === "edit") { |
| | | getCustomer(row.id).then((res) => { |
| | | form.value = { ...res.data }; |
| | | formYYs.value.contactList = res.data.contactPerson.split(",").map((item, index) => { |
| | | return { |
| | | contactPerson: item, |
| | | contactPhone: res.data.contactPhone.split(",")[index] |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | dialogFormVisible.value = true; |
| | | }; |
| | | // æäº¤è¡¨å |
| | | const submitForm = () => { |
| | | proxy.$refs["formRef"].validate((valid) => { |
| | | if (valid) { |
| | | if (operationType.value === "edit") { |
| | | submitEdit(); |
| | | } else { |
| | | submitAdd(); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | // æäº¤æ°å¢ |
| | | const submitAdd = () => { |
| | | if(formYYs.value.contactList.length < 1){ |
| | | return proxy.$modal.msgWarning("请è³å°æ·»å ä¸ä¸ªè系人"); |
| | | } |
| | | form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(","); |
| | | form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(","); |
| | | addCustomer(form.value).then((res) => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | getList(); |
| | | }); |
| | | }; |
| | | // æäº¤ä¿®æ¹ |
| | | const submitEdit = () => { |
| | | form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(","); |
| | | form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(","); |
| | | updateCustomer(form.value).then((res) => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | getList(); |
| | | }); |
| | | }; |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | }; |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/basic/customer/export", {}, "å®¢æ·æ¡£æ¡.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "å é¤æç¤º", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | tableLoading.value = true; |
| | | delCustomer(ids) |
| | | .then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // è·åå½åæ¥æå¹¶æ ¼å¼å为 YYYY-MM-DD |
| | | function getCurrentDate() { |
| | | const today = new Date(); |
| | | const year = today.getFullYear(); |
| | | const month = String(today.getMonth() + 1).padStart(2, "0"); // æä»½ä»0å¼å§ |
| | | const day = String(today.getDate()).padStart(2, "0"); |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .alarm-handle-knowledge { |
| | | padding: 16px; |
| | | background-color: #f0f2f5; |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | .search-card { |
| | | margin-bottom: 16px; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .table-card { |
| | | margin-top: 16px; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .pagination { |
| | | margin-top: 16px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding-right: 20px; |
| | | } |
| | | |
| | | </style> |
| | | <style scoped lang="scss"></style> |