1、定时任务页面新增查看日志功能
2、部门管理页面调整字段
| | |
| | | placeholder="æ "> |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCode" label="æºæç¼ç "> |
| | | <a-input disabled placeholder="请è¾å
¥æºæç¼ç " v-model="model.orgCode" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCategory" label="æºæç±»å"> |
| | | <template v-if="orgCategoryDisabled"> |
| | | <a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å"> |
| | | <a-radio value="1"> |
| | | å
¬å¸ |
| | | </a-radio> |
| | | </a-radio-group> |
| | | </template> |
| | | <template v-else> |
| | | <a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å"> |
| | | <a-radio value="2"> |
| | | é¨é¨ |
| | | </a-radio> |
| | | <a-radio value="3"> |
| | | å²ä½ |
| | | </a-radio> |
| | | </a-radio-group> |
| | | </template> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="é¨é¨è´è´£äºº"> |
| | | <j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCode" label="æºæç¼ç ">--> |
| | | <!--<a-input disabled placeholder="请è¾å
¥æºæç¼ç " v-model="model.orgCode" />--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCategory" label="æºæç±»å">--> |
| | | <!--<template v-if="orgCategoryDisabled">--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="1">--> |
| | | <!--å
¬å¸--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--<template v-else>--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="2">--> |
| | | <!--é¨é¨--> |
| | | <!--</a-radio>--> |
| | | <!--<a-radio value="3">--> |
| | | <!--å²ä½--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="é¨é¨è´è´£äºº">--> |
| | | <!--<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>--> |
| | | <!--</a-form-model-item>--> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æåº"> |
| | | <a-input-number v-model="model.departOrder" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ææºå·" prop="mobile"> |
| | | <a-input placeholder="请è¾å
¥ææºå·" v-model="model.mobile" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å°å"> |
| | | <a-input placeholder="请è¾å
¥å°å" v-model="model.address"/> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ææºå·" prop="mobile">--> |
| | | <!--<a-input placeholder="请è¾å
¥ææºå·" v-model="model.mobile" />--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å°å">--> |
| | | <!--<a-input placeholder="请è¾å
¥å°å" v-model="model.address"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.memo"/> |
| | | </a-form-model-item> |
| | |
| | | //update-begin---author:wangshuai ---date:20200308 forï¼[JTC-119]å¨é¨é¨ç®¡çèåä¸è®¾ç½®é¨é¨è´è´£äºº |
| | | this.currSelected.oldDirectorUserIds = this.oldDirectorUserIds |
| | | //update-end---author:wangshuai ---date:20200308 forï¼[JTC-119]å¨é¨é¨ç®¡çèåä¸è®¾ç½®é¨é¨è´è´£äºº |
| | | |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('ä¿åæå!') |
| | |
| | | } |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | |
| | | |
| | | }, |
| | | created() { |
| | | this.currFlowId = this.$route.params.id |
| | |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="ä»»å¡ç±»å" prop="jobClassName"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡ç±»å" v-model="queryParam.jobClassName"></a-input> |
| | | <a-form-model-item label="ä»»å¡åç§°" prop="jobClassName"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡åç§°" v-model="queryParam.jobName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="ä»»å¡ç¶æ" prop="status"> |
| | | <a-select style="width: 220px" v-model="queryParam.status" placeholder="è¯·éæ©ç¶æ"> |
| | | <a-select style="width: 100%" v-model="queryParam.status" placeholder="è¯·éæ©ç¶æ"> |
| | | <a-select-option value="">å
¨é¨</a-select-option> |
| | | <a-select-option value="0">æ£å¸¸</a-select-option> |
| | | <a-select-option value="-1">忢</a-select-option> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :scroll="{x:true}" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | |
| | | |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">å¯å¨</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">忢</a> |
| | | <a @click="executeImmediately(record)">ç«å³æ§è¡</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a @click="handlequartzLog(record)">æ¥å¿</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item><a @click="executeImmediately(record)">æ§è¡ä¸æ¬¡</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">å¯å¨</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">忢</a> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item><a @click="handleEdit(record)">ç¼è¾</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | |
| | | |
| | | <!-- 表ååºå --> |
| | | <quartzJob-modal ref="modalForm" @ok="modalFormOk"></quartzJob-modal> |
| | | |
| | | <!--æ¥å¿--> |
| | | <quartz-job-list-modal ref="modalFormList" @ok="modalFormOk"></quartz-job-list-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import QuartzJobModal from './modules/QuartzJobModal' |
| | | import QuartzJobListModal from './modules/QuartzJobListModal' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis"; |
| | |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | QuartzJobModal, |
| | | QuartzJobListModal, |
| | | JEllipsis |
| | | }, |
| | | data () { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: 'ä»»å¡ç±»å', |
| | | title: 'ä»»å¡åç§°', |
| | | align:"center", |
| | | dataIndex: 'jobClassName', |
| | | dataIndex: 'jobName', |
| | | sorter: true, |
| | | /* customRender:function (text) { |
| | | return "*"+text.substring(9,text.length); |
| | | }*/ |
| | | /* customRender:function (text) { |
| | | return "*"+text.substring(9,text.length); |
| | | }*/ |
| | | }, |
| | | { |
| | | title: 'cron表达å¼', |
| | |
| | | scopedSlots: {customRender: 'parameterRender'}, |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | title: '说æ', |
| | | align:"center", |
| | | width: 250, |
| | | dataIndex: 'description', |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | url: { |
| | | list: "/sys/quartzJob/list", |
| | | delete: "/sys/quartzJob/delete", |
| | | deleteBatch: "/sys/quartzJob/deleteBatch", |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | handlequartzLog: function (record) { |
| | | this.$refs.modalFormList.openPage(record); |
| | | this.$refs.modalFormList.title = "æ§è¡æ¥å¿"; |
| | | this.$refs.modalFormList.disableSubmit = false; |
| | | }, |
| | | //çééè¦éåhandleTableChange |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | //è¿ç§çéæ¹å¼åªæ¯æåé |
| | | |
| | | |
| | | // update-begin-author:liusq date:20210624 for:åå°å®æ¶ä»»å¡æ æ³ç¿»é¡µ #2666 |
| | | if(filters && Object.keys(filters).length>0 && filters.status){ |
| | | this.filters.status = filters.status[0]; |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.pause,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.resume,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.execute,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | :disabled="condition"> |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æºæç±»å"> |
| | | <template v-if="seen"> |
| | | <a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å"> |
| | | <a-radio value="1"> |
| | | å
¬å¸ |
| | | </a-radio> |
| | | </a-radio-group> |
| | | </template> |
| | | <template v-else> |
| | | <a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å"> |
| | | <a-radio value="2"> |
| | | é¨é¨ |
| | | </a-radio> |
| | | <a-radio value="3"> |
| | | å²ä½ |
| | | </a-radio> |
| | | </a-radio-group> |
| | | </template> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="é¨é¨è´è´£äºº"> |
| | | <j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="mobile" |
| | | label="çµè¯"> |
| | | <a-input placeholder="请è¾å
¥çµè¯" v-model="model.mobile"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¼ ç"> |
| | | <a-input placeholder="请è¾å
¥ä¼ ç" v-model="model.fax"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="å°å"> |
| | | <a-input placeholder="请è¾å
¥å°å" v-model="model.address"/> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="æºæç±»å">--> |
| | | <!--<template v-if="seen">--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="1">--> |
| | | <!--å
¬å¸--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--<template v-else>--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="2">--> |
| | | <!--é¨é¨--> |
| | | <!--</a-radio>--> |
| | | <!--<a-radio value="3">--> |
| | | <!--å²ä½--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="é¨é¨è´è´£äºº">--> |
| | | <!--<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="mobile"--> |
| | | <!--label="çµè¯">--> |
| | | <!--<a-input placeholder="请è¾å
¥çµè¯" v-model="model.mobile"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="ä¼ ç">--> |
| | | <!--<a-input placeholder="请è¾å
¥ä¼ ç" v-model="model.fax"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="å°å">--> |
| | | <!--<a-input placeholder="请è¾å
¥å°å" v-model="model.address"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <pre> |
| | | {{textContent}} |
| | | </pre> |
| | | |
| | | </div> |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | |
| | | export default { |
| | | name: 'QuartzJobDetails', |
| | | // mixins: [JeecgListMixin], |
| | | components: { |
| | | |
| | | }, |
| | | props: { |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | visible:false, |
| | | textContent:'', |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | showDetails(record){ |
| | | // console.log(record) |
| | | this.visible = true |
| | | this.textContent = record.exceptionDetail |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | handleOk() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="ä»»å¡åç§°"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡åç§°" v-model="queryParam.jobName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker show-time @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æ§è¡æ¥å¿å¯¼åº')">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button>--> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table ref="table" size="middle" bordered rowKey="index" :scroll="{Â y: 400Â }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | @change="handleTableChange"> |
| | | <!-- ç¶ææ¸²ææ¨¡æ¿ --> |
| | | <template slot="customRenderStatus" slot-scope="isSuccess"> |
| | | <a-tag v-if="isSuccess==0" color="green">æå</a-tag> |
| | | <a-tag v-if="isSuccess==-1" color="red">失败</a-tag> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | |
| | | <a v-if="record.isSuccess == -1" @click="executeImmediately(record)">æ¥ç详æ
</a> |
| | | |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | <quartz-job-details ref="modalForm"></quartz-job-details> |
| | | |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util'; |
| | | import { |
| | | ajaxGetSelectItems |
| | | } from '@/api/api' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import { |
| | | deleteAction, |
| | | requestPut, |
| | | getAction, |
| | | downFile, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import moment from 'moment' |
| | | import QuartzJobDetails from './QuartzJobDetails' |
| | | export default { |
| | | name: 'QuartzJobListModal', |
| | | // mixins: [JeecgListMixin], |
| | | components: { |
| | | JDictSelectTag, |
| | | JEllipsis, |
| | | JInput, |
| | | Tooltip, |
| | | JDate, |
| | | QuartzJobDetails |
| | | }, |
| | | props: { |
| | | status: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | visible:false, |
| | | /* æ¥è¯¢æ¡ä»¶-请ä¸è¦å¨queryParamä¸å£°æéå符串å¼ç屿§ */ |
| | | queryParam: {}, |
| | | /* æ°æ®æº */ |
| | | dataSource:[], |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* æåºåæ° */ |
| | | isorter:{ |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | /* çéåæ° */ |
| | | filters: {}, |
| | | /* tableå è½½ç¶æ */ |
| | | loading:false, |
| | | /* tableéä¸keys*/ |
| | | selectedRowKeys: [], |
| | | /* tableéä¸records*/ |
| | | selectionRows: [], |
| | | /* æ¥è¯¢æå */ |
| | | toggleSearchStatus:false, |
| | | /* é«çº§æ¥è¯¢æ¡ä»¶çæç¶æ */ |
| | | superQueryFlag:false, |
| | | /* é«çº§æ¥è¯¢æ¡ä»¶ */ |
| | | superQueryParams: '', |
| | | /** é«çº§æ¥è¯¢æ¼æ¥æ¹å¼ */ |
| | | superQueryMatchType: 'and', |
| | | |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | // { |
| | | // title: 'ä»»å¡åç§°', |
| | | // align: 'center', |
| | | // dataIndex: 'jobClassName', |
| | | // }, |
| | | // { |
| | | // title: 'cron表达å¼', |
| | | // align: 'center', |
| | | // dataIndex: 'cronExpression', |
| | | // }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: 'center', |
| | | dataIndex: 'jobName' |
| | | }, |
| | | { |
| | | title: 'åæ°', |
| | | align: 'center', |
| | | dataIndex: 'parameter' |
| | | }, |
| | | |
| | | { |
| | | title: 'æ¥éä¿¡æ¯', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | { |
| | | title: 'æåæ å¿', |
| | | align: 'center', |
| | | dataIndex: 'isSuccess', |
| | | scopedSlots: { customRender: 'customRenderStatus' }, |
| | | filterMultiple: false, |
| | | filters: [ |
| | | { text: 'æå', value: '0' }, |
| | | { text: '失败', value: '-1' }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ§è¡æ¶é´ï¼æ¯«ç§ï¼', |
| | | align: 'center', |
| | | dataIndex: 'executionTime', |
| | | customRender:(t,r,index) =>{ |
| | | var milliseconds = parseInt(t) |
| | | let hours = Math.floor(milliseconds / 3600000); |
| | | milliseconds = milliseconds % 3600000; |
| | | let minutes = Math.floor(milliseconds / 60000); |
| | | milliseconds = milliseconds % 60000; |
| | | let seconds = Math.floor(milliseconds / 1000); |
| | | milliseconds = milliseconds % 1000; |
| | | if(hours == 0){ |
| | | if(minutes == 0){ |
| | | if(seconds == 0) { |
| | | return `${milliseconds}毫ç§` |
| | | }else{ |
| | | return `${seconds}ç§ ${milliseconds}毫ç§` |
| | | } |
| | | }else{ |
| | | return `${minutes}åé ${seconds}ç§ ${milliseconds}毫ç§`; |
| | | } |
| | | }else{ |
| | | return `${hours}å°æ¶ ${minutes}åé ${seconds}ç§ ${milliseconds}毫ç§`; |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | { |
| | | title: '任塿§è¡æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | }, |
| | | ], |
| | | sectionPData: [], |
| | | sectionData: [], |
| | | url: { |
| | | list: '/sys/quartzLog/list', |
| | | exportXlsUrl:'/sys/quartzLog/exportXls' |
| | | }, |
| | | value:undefined, |
| | | valueProduct:undefined, |
| | | dates: [], |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | let id = this.queryParam.jobId |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParam.jobId = id |
| | | this.loadData(1); |
| | | }, |
| | | executeImmediately:function (record) { |
| | | this.$refs.modalForm.showDetails(record); |
| | | this.$refs.modalForm.title = "æ¥éä¿¡æ¯"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | }, |
| | | handleExportXls(fileName){ |
| | | if(!fileName || typeof fileName != "string"){ |
| | | fileName = "å¯¼åºæä»¶" |
| | | } |
| | | let param = this.getQueryParams(); |
| | | if(this.selectedRowKeys && this.selectedRowKeys.length>0){ |
| | | param['selections'] = this.selectedRowKeys.join(",") |
| | | } |
| | | console.log("导åºåæ°",param) |
| | | downFile(this.url.exportXlsUrl,param).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("æä»¶ä¸è½½å¤±è´¥") |
| | | return |
| | | } |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') |
| | | }else{ |
| | | let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) |
| | | let link = document.createElement('a') |
| | | link.style.display = 'none' |
| | | link.href = url |
| | | link.setAttribute('download', fileName+'.xls') |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link); //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url); //éæ¾æblob对象 |
| | | } |
| | | }) |
| | | }, |
| | | disabledDate(current) { |
| | | return current && current > moment().subtract('days', 1); |
| | | }, |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | // this.onClearSelected() |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | openPage(record) { |
| | | // console.log(record) |
| | | this.visible = true |
| | | this.dataSource = []; |
| | | this.queryParam = { |
| | | jobId: record.id |
| | | }; |
| | | |
| | | this.loadData(); |
| | | }, |
| | | getQueryParams() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if(this.superQueryParams){ |
| | | sqp['superQueryParams']=encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); |
| | | param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | param.jobId = this.queryParam.jobId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | | // if (this.getCustomQueryParams) { |
| | | // param = this.getCustomQueryParams(param); |
| | | // if(!param){ |
| | | // return false; |
| | | // } |
| | | // } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | getQueryField() { |
| | | //TODO åæ®µæéæ§å¶ |
| | | var str = "id,"; |
| | | this.columns.forEach(function (value) { |
| | | str += "," + value.dataIndex; |
| | | }); |
| | | return str; |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | if(!params){ |
| | | return false; |
| | | } |
| | | |
| | | this.loading = true; |
| | | // params.id = this.queryParam.id |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | }else{ |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | modalFormOk(val) { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData(); |
| | | |
| | | this.selectedRowKeys = [val.id]; |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(); |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | handleOk() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |