| | |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ApiUrl" prop="ApiUrl"> |
| | | <el-input v-model="dialogForm.ApiUrl" style="width: 200px" /> |
| | | <el-form-item label="请求方式" prop="RequestType"> |
| | | <!-- <el-input v-model="dialogForm.RequestType" style="width: 200px" />--> |
| | | <el-select |
| | | v-model="dialogForm.RequestType" |
| | | style="width:200px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in RequestTypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="header(Key)" prop="AuthKey"> |
| | | <el-input v-model="dialogForm.AuthKey" style="width: 200px" /> |
| | |
| | | <el-form-item label="header(value)" prop="AuthValue"> |
| | | <el-input v-model="dialogForm.AuthValue" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ApiUrl" prop="ApiUrl"> |
| | | <el-input v-model="dialogForm.ApiUrl" style="width: 520px" /> |
| | | </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-item required label="是否推送"> |
| | | <el-switch |
| | | v-model="dialogForm.MessagePush" |
| | | style="width: 200px" |
| | | active-color="#13ce66" |
| | | inactive-color="#eee" |
| | | active-value="Y" |
| | | inactive-value="N" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogForm.MessagePush==='Y'" label="推送人员"> |
| | | <el-select |
| | | v-model="dialogForm.PushUserCode" |
| | | style="width:200px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | clearable |
| | | multiple |
| | | collapse-tags |
| | | > |
| | | <el-option |
| | | v-for="item in userArr" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | |
| | | import { cron } from 'vue-cron' |
| | | import cronstrue from 'cronstrue/i18n' |
| | | import vcrontab from '../../components/VcronTab/index' |
| | | import { PersonPermissions } from '@/api/GeneralBasicData' |
| | | |
| | | export default { |
| | | name: 'CronTime', |
| | |
| | | Describe: '', // 描述 |
| | | RequestType: 'POST', // 请求类型 |
| | | LastRunTime: '', // 最后执行时间 |
| | | Status: 0// 状态 |
| | | Status: 0, // 状态 |
| | | MessagePush: 'Y', |
| | | PushUserCode: [] |
| | | }, |
| | | cronPopover: false, |
| | | |
| | |
| | | }, |
| | | dialogVisible2: false, |
| | | OrgTypeArrxx: [], |
| | | recordData: []// 查看记录数组 |
| | | recordData: [], // 查看记录数组 |
| | | userArr: [], |
| | | RequestTypeArr: [ |
| | | { code: 'POST', name: 'POST' }, |
| | | { code: 'GET', name: 'GET' } |
| | | ] |
| | | |
| | | } |
| | | }, |
| | |
| | | }, |
| | | created() { |
| | | this.getTaskBackGroundGetJobs() |
| | | this.getPersonPermissions() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | async getPersonPermissions() { |
| | | const { data: res } = await PersonPermissions() |
| | | this.userArr = res |
| | | }, |
| | | crontabFill(val) { |
| | | this.dialogForm.Interval = val |
| | | // const t = cronstrue.toString(this.dialogForm.Interval, { locale: 'zh_CN' }) |
| | |
| | | this.dialogForm.AuthKey = row.AuthKey |
| | | this.dialogForm.AuthValue = row.AuthValue |
| | | this.dialogForm.Describe = row.Describe |
| | | this.dialogForm.RequestType = row.RequestType |
| | | this.dialogForm.PushUserCode = row.MessagePush === 'Y' ? row.PushUserCode.split(',') : '' |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | this.dialogForm.Describe = '' |
| | | this.dialogForm.RequestType = 'POST' |
| | | this.dialogForm.LastRunTime = '' |
| | | this.dialogForm.MessagePush = 'Y' |
| | | this.dialogForm.PushUserCode = [] |
| | | this.dialogForm.Status = 0 |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | |
| | | // } |
| | | |
| | | if (this.operation === 'add') { |
| | | this.dialogForm.PushUserCode = this.dialogForm.MessagePush === 'Y' ? this.dialogForm.PushUserCode.join(',') : '' |
| | | TaskBackGroundAdd(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | // console.log(this.dialogForm.MessagePush === 'Y') |
| | | this.dialogForm.PushUserCode = this.dialogForm.MessagePush === 'Y' ? this.dialogForm.PushUserCode.join(',') : '' |
| | | TaskBackGroundUpdate(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |