| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢ä»»å¡</el-button> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-switch-button" @click="">æåä»»å¡</el-button>--> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-caret-right " @click="">å¼å¯ä»»å¡</el-button>--> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="">ç«å³æ§è¡</el-button>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="æ¯ä»¶ç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.OrgCode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯ä»¶åç§°" style=" display: flex;"> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯ä»¶è§æ ¼" style=" display: flex;"> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç¨ç¶æ" style=" display: flex;"> |
| | | <el-select v-model="form.OrgType" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in OrgTypeArrxx" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="çæ¬ç¼å·" style=" display: flex;"> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.UserName" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="åå»ºæ¥æ" style=" display: flex;"> |
| | | <el-date-picker |
| | | v-model="form.createdate" |
| | | style="width: 200px" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div |
| | | class="bodySearchReset" |
| | | :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}" |
| | | > |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | width="50" |
| | | fixed |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="TaskName" |
| | | label="ä½ä¸åç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="GroupName" |
| | | label="åç»" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="LastRunTime" |
| | | label="æåæ§è¡æ¶é´" |
| | | sortable="custom" |
| | | min-width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="Interval" |
| | | label="é´é" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="Status" |
| | | label="ç¶æ" |
| | | width="75" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-tag v-if="row.Status===0" size="medium" type="success">æ£å¸¸</el-tag> |
| | | <el-tag v-if="row.Status===1" size="medium" type="danger">æå</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="Describe" |
| | | label="æè¿°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="ApiUrl" |
| | | label="ApiUrl" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="RequestType" |
| | | label="è¯·æ±æ¹å¼" |
| | | sortable="custom" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | width="200" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="æåä»»å¡" placement="top"> |
| | | <i |
| | | class="el-icon-switch-button" |
| | | style="margin-right: 15px;color: RED;cursor: pointer" |
| | | @click="pauseTask(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="å¼å¯ä»»å¡" placement="top"> |
| | | <i |
| | | class="el-icon-caret-right" |
| | | style="margin-right: 15px;color: #42B983;cursor: pointer" |
| | | @click="startTask(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="ç«å³æ§è¡" placement="top"> |
| | | <i |
| | | class="el-icon-d-arrow-right" |
| | | style="margin-right: 15px;color: #42B983;cursor: pointer" |
| | | @click="runTask(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="æ¥çè®°å½" placement="top"> |
| | | <i |
| | | class="el-icon-document" |
| | | style="margin-right: 15px;color: #42B983;cursor: pointer" |
| | | @click="check(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="ç¼è¾ä»»å¡" placement="top"> |
| | | <i class="el-icon-edit-outline" :style="{color:$store.state.settings.theme}" @click="edit('edit',row)" /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" :style="{color:$store.state.settings.theme}" content="å é¤ä»»å¡" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getTaskBackGroundGetJobs" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="900px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px"> |
| | | <el-form-item label="ä½ä¸åç§°" prop="TaskName"> |
| | | <el-input v-model="dialogForm.TaskName" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="åç»" prop="GroupName"> |
| | | <el-input v-model="dialogForm.GroupName" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-popover v-model="cronPopover">--> |
| | | <!-- <cron i18n="cn" @change="changeCron" @close="cronPopover=false" />--> |
| | | <!-- <el-form-item slot="reference" label="cron表达å¼" prop="Interval">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="dialogForm.Interval"--> |
| | | <!-- placeholder="请è¾å
¥å®æ¶çç¥"--> |
| | | <!-- style="width:200px"--> |
| | | <!-- @click="cronPopover=true"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-popover>--> |
| | | |
| | | <el-form-item label="cron表达å¼" prop="Interval"> |
| | | <el-input |
| | | v-model="dialogForm.Interval" |
| | | placeholder="请è¾å
¥å®æ¶çç¥" |
| | | style="width:200px" |
| | | readonly |
| | | > |
| | | <el-button slot="append" icon="el-icon-thumb" @click="showDialog" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ApiUrl" prop="ApiUrl"> |
| | | <el-input v-model="dialogForm.ApiUrl" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="header(Key)" prop="AuthKey"> |
| | | <el-input v-model="dialogForm.AuthKey" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="header(value)" prop="AuthValue"> |
| | | <el-input v-model="dialogForm.AuthValue" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="è¯·æ±æ¹å¼" prop="RequestType">--> |
| | | <!-- <el-input v-model="dialogForm.RequestType" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="æè¿°" prop="Describe"> |
| | | <el-input v-model="dialogForm.Describe" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :close-on-click-modal="false" |
| | | top="8vh" |
| | | width="900px" |
| | | title="çæ cron" |
| | | :visible.sync="showCron" |
| | | append-to-body |
| | | > |
| | | <vcrontab :expression="expression" @hide="showCron=false" @fill="crontabFill" /> |
| | | </el-dialog> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button v-waves type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="cron æ§è¡è®°å½" |
| | | :visible.sync="dialogVisible2" |
| | | width="900px" |
| | | |
| | | top="15vh" |
| | | @closed="handleClose2" |
| | | @close="handleClose2" |
| | | > |
| | | <!-- :close-on-click-modal="false"--> |
| | | <!-- {{ recordData }}--> |
| | | |
| | | <el-timeline :reverse="false"> |
| | | <el-timeline-item |
| | | v-for="(item, index) in recordData" |
| | | :key="item.BeginDate" |
| | | :timestamp="item.Msg" |
| | | > |
| | | {{ item.BeginDate }} |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisible2=false">è¿ å</el-button> |
| | | <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { |
| | | TaskBackGroundAdd, |
| | | TaskBackGroundGetJobs, |
| | | TaskBackGroundGetRunLog, |
| | | TaskBackGroundPause, |
| | | TaskBackGroundRemove, TaskBackGroundRun, |
| | | TaskBackGroundStart, TaskBackGroundUpdate |
| | | } from '@/api/TaskBackGround' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { cron } from 'vue-cron' |
| | | import cronstrue from 'cronstrue/i18n' |
| | | import vcrontab from '../../components/VcronTab/index' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, cron, vcrontab |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | OrgCode: '', // ç»ç»æ¶æä»£ç |
| | | OrgName: '', // ç»ç»æ¶æåç§° |
| | | OrgType: '', // ç»ç»ç±»å |
| | | UserName: '', // å建人å |
| | | createdate: '', |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | TaskName: '', // ä½ä¸åç§° |
| | | GroupName: '', // åç» |
| | | Interval: '', // é´é |
| | | ApiUrl: '', // ApiUrl |
| | | AuthKey: '', // AuthKey |
| | | AuthValue: '', // AuthValue |
| | | Describe: '', // æè¿° |
| | | RequestType: 'POST', // 请æ±ç±»å |
| | | LastRunTime: '', // æåæ§è¡æ¶é´ |
| | | Status: 0// ç¶æ |
| | | }, |
| | | cronPopover: false, |
| | | |
| | | showCron: false, |
| | | expression: '', |
| | | |
| | | operation: '', |
| | | dialogFormRules: { |
| | | TaskName: [ |
| | | { required: true, message: '请è¾å
¥ä½ä¸ä»»å¡', trigger: ['blur', 'change'] } |
| | | ], |
| | | GroupName: [ |
| | | { required: true, message: '请è¾å
¥åç»', trigger: ['blur', 'change'] } |
| | | ], |
| | | Interval: [ |
| | | { required: true, message: '请è¾å
¥cron表达å¼', trigger: ['blur', 'change'] } |
| | | ], |
| | | ApiUrl: [ |
| | | { required: true, message: '请è¾å
¥ApiUrl', trigger: ['blur', 'change'] } |
| | | ], |
| | | RequestType: [ |
| | | { required: true, message: '请è¾å
¥è¯·æ±æ¹å¼', trigger: ['blur', 'change'] } |
| | | ], |
| | | Describe: [ |
| | | { required: true, message: '请è¾å
¥è¯·æ±æè¿°', trigger: ['blur', 'change'] } |
| | | ] |
| | | // AuthKey: [ |
| | | // { required: true, message: '请è¾å
¥authKey', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // AuthValue: [ |
| | | // { required: true, message: '请è¾å
¥authValue', trigger: ['blur', 'change'] } |
| | | // ] |
| | | |
| | | }, |
| | | dialogVisible2: false, |
| | | OrgTypeArrxx: [], |
| | | recordData: []// æ¥çè®°å½æ°ç» |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTaskBackGroundGetJobs() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | crontabFill(val) { |
| | | this.dialogForm.Interval = val |
| | | // const t = cronstrue.toString(this.dialogForm.Interval, { locale: 'zh_CN' }) |
| | | // console.log(t) |
| | | }, |
| | | showDialog() { |
| | | this.expression = this.dialogForm.Interval |
| | | // ä¼ å
¥ç cron 表达å¼ï¼å¯ä»¥åè§£æå° UI ä¸ |
| | | this.showCron = true |
| | | }, |
| | | changeCron(val) { |
| | | this.dialogForm.Interval = val |
| | | // cronstrue æ¯ä¸ä¸ª JavaScript åºï¼è§£æ cron 表达å¼å¹¶è¾åºå¯è¯»ç cron æè¿°ã |
| | | // const t = cronstrue.toString(this.dialogForm.Interval, { locale: 'zh_CN' }) |
| | | // console.log(t) |
| | | }, |
| | | async getTaskBackGroundGetJobs() { |
| | | const res = await TaskBackGroundGetJobs() |
| | | this.tableData = res.data |
| | | this.total = res.data.length |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getTaskBackGroundGetJobs() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getTaskBackGroundGetJobs() |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getTaskBackGroundGetJobs() |
| | | }, |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.$nextTick(() => { |
| | | this.dialogForm.TaskName = row.TaskName |
| | | this.dialogForm.GroupName = row.GroupName |
| | | this.dialogForm.Interval = row.Interval |
| | | this.dialogForm.ApiUrl = row.ApiUrl |
| | | this.dialogForm.AuthKey = row.AuthKey |
| | | this.dialogForm.AuthValue = row.AuthValue |
| | | this.dialogForm.Describe = row.Describe |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TaskBackGroundRemove(row).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getTaskBackGroundGetJobs() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // æåä»»å¡ |
| | | async pauseTask(row) { |
| | | const res = await TaskBackGroundPause(row) |
| | | if (res.code === '200') { |
| | | await this.getTaskBackGroundGetJobs() |
| | | return this.$message.success(res.message) |
| | | } |
| | | }, |
| | | // å¼å¯ä»»å¡ |
| | | async startTask(row) { |
| | | const res = await TaskBackGroundStart(row) |
| | | if (res.code === '200') { |
| | | await this.getTaskBackGroundGetJobs() |
| | | return this.$message.success(res.message) |
| | | } |
| | | }, |
| | | // ç«å³æ§è¡ |
| | | async runTask(row) { |
| | | const res = await TaskBackGroundRun(row) |
| | | if (res.code === '200') { |
| | | await this.getTaskBackGroundGetJobs() |
| | | this.$message.success(res.message) |
| | | } |
| | | }, |
| | | // æ¥çè®°å½ |
| | | async check(row) { |
| | | const data = { |
| | | TaskName: row.TaskName, |
| | | GroupName: row.GroupName, |
| | | page: 1 |
| | | } |
| | | const res = await TaskBackGroundGetRunLog(data) |
| | | |
| | | if (res.code === '200') { |
| | | this.recordData = res.data |
| | | this.dialogVisible2 = true |
| | | } |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.TaskName = '' |
| | | this.dialogForm.GroupName = '' |
| | | this.dialogForm.Interval = '' |
| | | this.dialogForm.ApiUrl = '' |
| | | this.dialogForm.AuthKey = '' |
| | | this.dialogForm.AuthValue = '' |
| | | this.dialogForm.Describe = '' |
| | | this.dialogForm.RequestType = 'POST' |
| | | this.dialogForm.LastRunTime = '' |
| | | this.dialogForm.Status = 0 |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | console.log(this.dialogForm) |
| | | |
| | | // console.log(new Date().getUTCDate()) |
| | | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | // const data = { |
| | | // OrganCode: this.dialogForm.OrgCode, |
| | | // OrganName: this.dialogForm.OrgName, |
| | | // OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | // Operator: getCookie('admin') |
| | | // } |
| | | |
| | | if (this.operation === 'add') { |
| | | TaskBackGroundAdd(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getTaskBackGroundGetJobs() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } else { |
| | | TaskBackGroundUpdate(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getTaskBackGroundGetJobs() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleClose2() { |
| | | this.recordData = [] |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .pop_btn { |
| | | display: flex; |
| | | justify-content: right; |
| | | } |
| | | </style> |