¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-row :gutter="20"> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="ä¸å¡ç±»å" style="width: 100%;"> |
| | | <el-select v-model="queryParams.bizType" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in bizType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="è¯·æ±æ¶é´" style="width: 100%;"> |
| | | <el-date-picker |
| | | v-model="createTimes" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <!-- <el-col :span="6"> |
| | | <el-form-item label="请æ±åæ°" prop="requestData"> |
| | | <el-input |
| | | v-model="queryParams.requestData" |
| | | placeholder="请è¾å
¥è¯·æ±åæ°" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col>--> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="请æ±ç»æ" prop="result"> |
| | | <el-input |
| | | v-model="queryParams.result" |
| | | placeholder="请è¾å
¥è¯·æ±ç»æ" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ååºæ°æ®" prop="requestData"> |
| | | <el-input |
| | | v-model="queryParams.responseData" |
| | | placeholder="请è¾å
¥ååºæ°æ®" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | :span="24" |
| | | style="text-align: right;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsWorkOrderJobLog:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsWorkOrderJobLog:edit']" |
| | | >æ¥ç</el-button> |
| | | </el-col> |
| | | |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="LogList" |
| | | :loading="loading" |
| | | :height="height" > |
| | | <template #buttons="{row}"> |
| | | <vxe-button mode="text" @click="handleUpdate(row)" v-hasPermi="['apsWorkOrderJobLog:edit']" >æ¥ç</vxe-button> |
| | | </template> |
| | | </HxlhTable> |
| | | |
| | | <!-- æ·»å æä¿®æ¹å·¥å忥æ¥å¿å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form ref="ApsWorkOrderJobLogRef" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="页ç " prop="pageNum"> |
| | | <el-input v-model="form.pageNum" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="è¯·æ±æ°é" prop="pageCount"> |
| | | <el-input v-model="form.pageCount" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="请æ±åæ°" prop="requestData"> |
| | | <el-input v-model="form.requestData" type="textarea" :rows="4" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¿åç»æ" prop="result"> |
| | | <el-input v-model="form.result" type="textarea" :rows="4" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="ååºæ°æ®" prop="responseData"> |
| | | <el-input v-model="form.responseData" type="textarea" :rows="4" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="æäº¤æ¶é´" prop="createTime"> |
| | | <el-input v-model="form.createTime" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ°æ¶é´" prop="updateTime"> |
| | | <el-input v-model="form.updateTime" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="忥䏻é®" v-show="false" prop="orderId"> |
| | | <el-input v-model="form.orderId" placeholder="请è¾å
¥åæ¥ä¸»é®" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">鿰忥</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="ApsWorkOrderJobLog"> |
| | | import { list, get, sync } from "@/api/mainPlan/workOrderJobLog"; |
| | | import {ref} from "vue"; |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | |
| | | const LogList = ref([]); |
| | | const open = ref(false); |
| | | const loading = ref(true); |
| | | const showSearch = ref(true); |
| | | const ids = ref([]); |
| | | const single = ref(true); |
| | | const multiple = ref(true); |
| | | const total = ref(0); |
| | | const title = ref(""); |
| | | const createTimes=ref([]); |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageCount: null, |
| | | responseData: null, |
| | | result: null, |
| | | orderId: null, |
| | | requestData: null |
| | | }, |
| | | rules: { |
| | | } |
| | | }); |
| | | const columns = ref([ |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | |
| | | { title: 'ä¸å¡ç±»å', field:'bizType', width: 150 }, |
| | | { title: '页ç ', field:'pageNum', width: 80 }, |
| | | { title: 'è¯·æ±æ°é', field:'pageCount', width: 80 }, |
| | | { title: '请æ±åæ°', field:'requestData' }, |
| | | { title: 'è¯·æ±æ¶é´', field:'createTime', width: 150 }, |
| | | { title: 'æ´æ°æ¶é´', field:'updateTime', width: 150 }, |
| | | { title: '请æ±ç»æ', field:'result', width: 150 }, |
| | | { title: 'ååºæ°æ®', field:'responseData' }, |
| | | { title: 'æä½', width: 100, fixed:"right", slots: { default: 'buttons' } } |
| | | ]) |
| | | const bizType = ref([ |
| | | {value:'work_order',label:' work_order'}, |
| | | {value:'work_order_process',label:' work_order_process'} |
| | | |
| | | ]); |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | |
| | | /** æ¥è¯¢å·¥å忥æ¥å¿å表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | queryParams.value.params = {}; |
| | | if (null != createTimes && '' !== createTimes) { |
| | | queryParams.value.params["beginCreateTime"] = createTimes.value[0]; |
| | | queryParams.value.params["endCreateTime"] = createTimes.value[1]; |
| | | } |
| | | list(queryParams.value).then(response => { |
| | | LogList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | // åæ¶æé® |
| | | function cancel() { |
| | | open.value = false; |
| | | reset(); |
| | | } |
| | | |
| | | // 表åéç½® |
| | | function reset() { |
| | | form.value = { |
| | | id: null, |
| | | pageNum: null, |
| | | pageCount: null, |
| | | responseData: null, |
| | | result: null, |
| | | orderId: null, |
| | | requestData: null |
| | | }; |
| | | proxy.resetForm("ApsWorkOrderJobLogRef"); |
| | | } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | |
| | | |
| | | getList(); |
| | | } |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | proxy.resetForm("queryRef"); |
| | | handleQuery(); |
| | | } |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | function handleSelectionChange(selection) { |
| | | ids.value = selection.map(item => item.id); |
| | | single.value = selection.length != 1; |
| | | multiple.value = !selection.length; |
| | | } |
| | | |
| | | /** æ°å¢æé®æä½ */ |
| | | function handleAdd() { |
| | | reset(); |
| | | open.value = true; |
| | | title.value = "æ·»å å·¥å忥æ¥å¿"; |
| | | } |
| | | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | function handleUpdate(row) { |
| | | reset(); |
| | | const _id = row.id || ids.value |
| | | |
| | | get(_id).then(response => { |
| | | form.value = response.data; |
| | | open.value = true; |
| | | title.value = "æ¥çå·¥å忥æ¥å¿"; |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | /** æäº¤æé® */ |
| | | function submitForm() { |
| | | proxy.$refs["ApsWorkOrderJobLogRef"].validate(valid => { |
| | | if (valid) { |
| | | if (form.value.id != null) { |
| | | debugger; |
| | | if(form.value.bizType==="work_order"){ |
| | | sync(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("忥æå"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | }else { |
| | | proxy.$modal.msgSuccess("ææªå®ç°"); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download('log/ApsWorkOrderJobLog/export', { |
| | | ...queryParams.value |
| | | }, `ApsWorkOrderJobLog_${new Date().getTime()}.xlsx`) |
| | | } |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | function handleDelete(row) { |
| | | const _ids = row.id || ids.value; |
| | | proxy.$modal.confirm('æ¯å¦ç¡®è®¤å é¤å·¥å忥æ¥å¿ç¼å·ä¸º"' + _ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delApsWorkOrderJobLog(_ids); |
| | | }).then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | } |
| | | |
| | | |
| | | getList(); |
| | | </script> |