| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 设å¤åç¨ --> |
| | | <template> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æµç¨ç¼å·ï¼</div> |
| | | <div><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.processNumber" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="add">æ°å¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tables" style="margin-top: 10px;"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" |
| | | :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> --> |
| | | </div> |
| | | <el-dialog title="仪å¨è®¾å¤é¢(å)ç¨ç»è®°" top="5vh" :visible.sync="dialogVisible" width="60%"> |
| | | <el-steps :active="currentStep" finish-status="success" align-center> |
| | | <el-step style="cursor:pointer" v-for="(v, i) in steps" :title="v" :key="i" |
| | | @click.native="choiceStep(i)"></el-step> |
| | | </el-steps> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
| | | <div v-show="currentStepClick === 0"> |
| | | <el-card style="margin-top: 1em; height: 51vh; overflow-y: scroll;"> |
| | | <!-- æ°å¢è®¾å¤äºè®°å½å¡ç --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å·ï¼" prop="processNumber"> |
| | | <el-input v-model="form.processNumber" size="small" :disabled="currentStep > 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°ï¼"> |
| | | <el-input v-model="form.deviceName" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="管çç¼å·ï¼" prop="unifyNumber"> |
| | | <el-input v-model="form.unifyNumber" size="small" :disabled="currentStep > 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨äººï¼" prop="recipientUser"> |
| | | <el-select v-model="form.recipientUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 100%;" :disabled="currentStep > 0"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨äººèç³»æ¹å¼ï¼" prop="borrowerContactInformation" label-width="150px"> |
| | | <el-input v-model="form.borrowerContactInformation" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨æ¥æï¼" prop="recipientTime"> |
| | | <el-date-picker v-model="form.recipientTime" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | format="yyyy-MM-dd" style="width: 100%" value-format="yyyy-MM-dd" :disabled="currentStep > 0"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨æ¶ç¶æï¼"> |
| | | <el-radio-group v-model="form.recipientState" :disabled="currentStep !== 0"> |
| | | <el-radio :label="0">åæ ¼</el-radio> |
| | | <el-radio :label="1">ç»´ä¿®</el-radio> |
| | | <el-radio :label="2">åç¨</el-radio> |
| | | <el-radio :label="3">æ¥åº</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç¸å
³éä»¶ï¼" prop="fileName"> |
| | | <el-input v-model="form.fileName" disabled size="small" |
| | | :style="`width: ${currentStep == 0 ? '88%' : '100%'};`"> |
| | | <el-button slot="append" v-if="currentStep === 0" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload ref="upload" style="float: right;" :action="action" :show-file-list="false" |
| | | :on-success="onSuccess" :disabled="currentStep !== 0" :headers="uploadHeader"> |
| | | <el-button style="position: relative;top: -4px" class="uploadFile" slot="trigger" size="small" |
| | | type="primary" v-if="currentStep === 0">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯è责任人ï¼" prop="nextUser"> |
| | | <el-select v-model="form.nextUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 100%;" :disabled="currentStep !== 0"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.submitOperationUser }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.submitOperationTime }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 1"> |
| | | <el-card style="margin-top: 1em; height: 51vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿äººï¼" prop="rebackUser" |
| | | :rules="[{ required: currentStep === 1, message: '请è¾å
¥å½è¿äºº', trigger: 'change' }]"> |
| | | <!-- <el-input v-model="form.rebackUser" size="small" :disabled="currentStep !== 1"></el-input> --> |
| | | <el-select v-model="form.rebackUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 50%;" :disabled="currentStep !== 1"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿æ¥æï¼" prop="rebackTime" |
| | | :rules="[{ required: currentStep === 1, message: 'è¯·éæ©å½è¿æ¥æ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="form.rebackTime" :disabled="currentStep !== 1" type="date" placeholder="éæ©æ¥æ" |
| | | size="small" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶ç¶åµï¼"> |
| | | <el-radio-group v-model="form.receiveState" :disabled="currentStep !== 1"> |
| | | <el-radio :label="0">åæ ¼</el-radio> |
| | | <el-radio :label="1">ç»´ä¿®</el-radio> |
| | | <el-radio :label="2">åç¨</el-radio> |
| | | <el-radio :label="3">æ¥åº</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤è´è´£äººï¼" prop="deviceUser" |
| | | :rules="[{ required: currentStep === 1, message: 'è¯·éæ©è®¾å¤è´è´£äºº', trigger: 'change' }]"> |
| | | <!-- <el-input v-model="form.deviceUser" size="small" :disabled="currentStep !== 1"></el-input> --> |
| | | <el-select v-model="form.deviceUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 50%;" :disabled="currentStep !== 1"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨ï¼"> |
| | | <el-input type="textarea" v-model="form.note" :disabled="currentStep !== 1" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.receiveOperationUser }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.receiveOperationTime }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="submitForm('3reject')" v-if="currentStep !== 0 && currentStep !== 2">驳å</el-button> |
| | | <el-button @click="submitForm('2save')" v-if="currentStep === 0">ä¿å</el-button> |
| | | <el-button type="primary" v-if="currentStep !== 2" @click="submitForm('1submit')">{{ currentStep === 0 ? 'æäº¤' : |
| | | 'éè¿' |
| | | }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æµç¨è·è¸ª" top="5vh" :visible.sync="dialogVisible0" width="60%"> |
| | | <el-table :data="deviceLogs" style="width: 100%"> |
| | | <el-table-column type="index" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="operator" label="æä½äºº" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationTime" label="æä½æ¥æ" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationType" label="æäº¤ç±»å"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationContent" label="æä½å
容"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { |
| | | saveDeviceBorrow, |
| | | deleteCNASFile, |
| | | getDeviceBorrow, |
| | | deviceBorrowExport, |
| | | deleteDeviceBorrow, |
| | | deviceBorrowPage, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | dialogVisible0: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | currentStepClick: 0, // ç¹å»æ¥éª¤æ¡åå |
| | | steps: ['ååº', 'åç¨'], |
| | | responsibleOptions: [], // ä¸ç¯èè´è´£äººlist |
| | | form: { |
| | | processNumber: null, |
| | | deviceName: null, |
| | | unifyNumber: null, |
| | | recipientUser: null, |
| | | recipientTime: null, |
| | | nextUser: null, |
| | | rebackUser: null, |
| | | rebackTime: null, |
| | | receiveState: null, |
| | | deviceUser: null, |
| | | fileName: null, |
| | | }, |
| | | rules: { |
| | | processNumber: [{ required: true, message: '请è¾å
¥ç¼å·', trigger: 'blur' }], |
| | | deviceName: [{ required: true, message: '请è¾å
¥è®¾å¤åç§°', trigger: 'blur' }], |
| | | unifyNumber: [{ required: true, message: '请è¾å
¥ç®¡çç¼å·', trigger: 'blur' }], |
| | | recipientUser: [{ required: true, message: '请è¾å
¥åç¨äºº', trigger: 'blur' }], |
| | | borrowerContactInformation: [{ required: true, message: '请è¾å
¥åç¨äººèç³»æ¹å¼', trigger: 'blur' }], |
| | | recipientTime: [{ required: true, message: 'è¯·éæ©åç¨æ¥æ', trigger: 'change' }], |
| | | nextUser: [{ required: true, message: 'è¯·éæ©ä¸ç¯èè´è´£äºº', trigger: 'change' }], |
| | | }, |
| | | deviceLogs: [], |
| | | outLoading: false, |
| | | recipientStateList: [{ |
| | | value: 0, |
| | | type: 'success', |
| | | label: 'åæ ¼' |
| | | }, { |
| | | value: 1, |
| | | type: 'warning', |
| | | label: 'ç»´ä¿®' |
| | | }, { |
| | | value: 2, |
| | | type: 'info', |
| | | label: 'åç¨' |
| | | }, { |
| | | value: 3, |
| | | type: 'danger', |
| | | label: 'æ¥åº' |
| | | }], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æµç¨ç¼å·", prop: "processNumber" }, |
| | | { label: "设å¤åç§°", prop: "deviceName" }, |
| | | { |
| | | label: "管çç¼å·", |
| | | prop: "unifyNumber" |
| | | }, |
| | | { label: "åç¨äºº", prop: "recipientUser" }, |
| | | { label: "åç¨äººèç³»æ¹å¼", prop: "borrowerContactInformation", width: '140px' }, |
| | | { label: "åç¨æ¥æ", prop: "recipientTime" }, |
| | | { |
| | | label: "åç¨æ¶ç¶æ", prop: "recipientState", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "ååºäºº", prop: "submitUser" }, |
| | | { label: "ååºæ¥æ", prop: "createTime" }, |
| | | { |
| | | label: "å½åç¶æ", prop: "nowState" |
| | | }, |
| | | { label: "å½å责任人", prop: "nowUser" }, |
| | | { label: "éä»¶", prop: "fileName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.lookDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æµç¨è·è¸ª", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLookList(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | thisqueryParams.deviceId = this.clickNodeVal.value |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = {} |
| | | this.currentStep = 0 // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | this.currentStepClick = 0 // ç¹å»æ¥éª¤æ¡åå |
| | | this.$refs['form'].clearValidate() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.queryParams.deviceId = this.clickNodeVal.value |
| | | this.getUserList() |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | deviceBorrowPage({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | const dateTime = dateFormat(new Date()) |
| | | // è·åå½åç¯èæä½äººä¸æ¥æ |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submitOperationUser = this.nickName |
| | | this.form.submitOperationTime = dateTime |
| | | break |
| | | case 1: |
| | | this.form.receiveOperationUser = this.nickName |
| | | this.form.receiveOperationTime = dateTime |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¯èè´è´£äºº |
| | | switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { |
| | | case 0: |
| | | this.form.nowUser = this.form.nextUser |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | let currentStepAction; |
| | | // 设置该æä½å¤ææ¯å¦ä¸ºæäº¤ï¼ä¿åï¼é©³åï¼éè¿ |
| | | switch (saveState) { |
| | | // æäº¤ï¼éè¿ |
| | | case '1submit': |
| | | currentStepAction = this.currentStep + 1 |
| | | break |
| | | // ä¿å |
| | | case '2save': |
| | | currentStepAction = this.currentStep |
| | | break |
| | | // 驳å |
| | | case '3reject': |
| | | currentStepAction = this.currentStep - 1 |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¶æ |
| | | this.form.nowState = currentStepAction === 2 ? 'å
³é' : this.steps[currentStepAction] |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | delete this.form.deviceLogs |
| | | saveDeviceBorrow(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.dialogVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } else { |
| | | let step = this.steps[this.currentStep] |
| | | this.$message.warning(step + ' æµç¨ä¸æå¿
填项æªå¡«ï¼'); |
| | | } |
| | | }); |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({ fileName: this.form.fileName }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | if (response.code == 200) { |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.form.fileName = file.name |
| | | this.form.url = response.data |
| | | } else { |
| | | this.$message.error(response.message) |
| | | } |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | // æ¥ç详æ
|
| | | lookDetail(row) { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.form = res.data |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | this.deviceLogs = res.data.deviceLogs |
| | | let i = this.steps.findIndex(item => item == row.nowState) |
| | | if (i == -1) { |
| | | this.currentStep = 2 |
| | | this.currentStepClick = 0 |
| | | } else { |
| | | this.currentStep = i |
| | | this.currentStepClick = i |
| | | } |
| | | console.log(this.currentStepClick) |
| | | this.dialogVisible = true |
| | | } |
| | | }) |
| | | }, |
| | | // æ°å¢ |
| | | add() { |
| | | this.dialogVisible = true |
| | | this.form = { |
| | | processNumber: null, |
| | | deviceName: null, |
| | | unifyNumber: null, |
| | | recipientUser: null, |
| | | recipientTime: null, |
| | | nextUser: null, |
| | | rebackUser: null, |
| | | rebackTime: null, |
| | | receiveState: null, |
| | | deviceUser: null, |
| | | fileName: null, |
| | | } |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | }, |
| | | //å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | deviceBorrowExport({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | const filename = decodeURI(this.clickNodeVal.label + '设å¤ååºç»è®¡' + '.xlsx') |
| | | this.$download.saveAs(blob, filename) |
| | | }) |
| | | }, |
| | | handleLookList(row) { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.deviceLogs = res.data.deviceLogs |
| | | this.dialogVisible0 = true |
| | | } |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | deleteDeviceBorrow({ id: row.id }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | h4 { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 15em); |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | |
| | | .btns_thing { |
| | | position: absolute; |
| | | right: 230px; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | |
| | | .form .search_label { |
| | | width: 120px; |
| | | } |
| | | |
| | | .el-radio { |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .el-radio-group { |
| | | width: 100%; |
| | | display: flex; |
| | | margin-top: 12px; |
| | | } |
| | | </style> |