SCHEDULE OF THIS WEEK

PSO

  1. Computational Intelligence An Introduction\计算群体智能基础(主要是pso章节部分和前面基础部分)
  2. Particle Swarm optimization Research Toolbox document(y越快看完越好开始使用)
  3. 神经43例学习学习简单案例

NN AND DL

  1. Andrew NG Tutorial excersies
  2. 神经网络与机器学习\Neural Networks前四章(越快越好)
  3. 进度是第五章(RBF AND MPL)
  4. PRLM studying

MATLAB MATH

  1. Advanced engineering math with matlab(chap15/chap16/chap17 )

    Python

    Webtrianning这里写链接内容

PAPER (越快越好)

TED Steve Jobs

<template> <div class="addTaskModal" v-if="visible"> <editAndAddPage :router="'/basicConfiguration'" :title="titles" @cancel="cancel" @submit="submit"> <template v-slot:pageBody> <div class="main-body-box"> <a-form-model :label-col="{ span: 2 }" :wrapper-col="{ span: 22 }" ref="ruleForm" :rules="rules" :model="modalData" > <a-form-model-item label=""></a-form-model-item> <a-form-model-item :label="$t('任务名称:')" prop="taskName"> <a-input :placeholder="$t('请输入任务名称')" v-model="modalData.taskName" maxLength="25"> </a-input> </a-form-model-item> <a-form-model-item :label="$t('包含设备:')"> <Transfer ref="transferRef" :hostModel="modalData.hostModel"></Transfer> </a-form-model-item> <a-form-model-item :label="$t('空开配置:')"> <div class="config_content"> <div class="config_item" v-for="(item, index) in configArr" :key="index"> <div class="config_title"> <a-select v-model="item.configTypeCode" @change="handleConfigTypeChange($event, index)" :placeholder="$t('请选择')" > <a-select-option :value="el.configTypeCode" v-for="el in configTypeOptions" :disabled="el.disabled" :key="el.configTypeCode" :title="$t(el.configTypeName)" > {{ $t(el.configTypeName) }} </a-select-option> </a-select> <hd-icon type="delete" @click="delConfig(index)" /> </div> <div class="config_main"> <div class="type_info"> <span>{{ $t('操作类型:') }}</span> <a-radio-group v-model="item.cmd"> <a-radio-button value="0"> {{ $t('分闸') }}</a-radio-button> <a-radio-button value="1"> {{ $t('合闸') }} </a-radio-button> </a-radio-group> </div> <div class="time_info"> <span>{{ $t('时间范围:') }}</span> <a-time-picker class="mgb_12" format="HH:mm" valueFormat="HH:mm" v-model="item.excTime" :placeholder="$t('选择时间')" /> </div> <div class="week_info"> <span>{{ $t('运行周期:') }}</span> <div class="week_list"> <div class="week_item" v-for="(day, indx) in item.weekList" :key="indx" @click="toggleDay(day, item)" :class="{ selected: day.value == 1 }" > <div>{{ day.name }}</div> <div v-show="day.value == 1" class="triangle"></div> <div v-show="day.value == 1" class="checkmark"></div> </div> </div> </div> </div> </div> </div> <div class="addBtn" @click="addConfig"> <hd-icon type="add" /> {{ $t('新增空开配置') }} </div> </a-form-model-item> </a-form-model> </div> </template> </editAndAddPage> </div> </template> <script> import reg from '@/common/js/reg' import factory from '../factory' import Transfer from './Transfer.vue' import editAndAddPage from '@/components/scfComponents/editAndAddPage/editAndAddPage.vue' export default { components: { Transfer, editAndAddPage }, data() { return { titles: '新增空开定时任务', visible: false, modalData: { taskName: '', hostModel: undefined, }, rules: { taskName: [ { required: true, message: '请输入任务名称', trigger: 'blur' }, { pattern: reg.name, message: this.$t('仅允许输入汉字、字母、数字与_-.@字符') }, ], }, configTypeOptions: [], configArr: [], } }, computed: {}, mounted() {}, methods: { // 打开弹窗 showModal() { this.visible = true // 获取主机型号 this.modalData = { taskName: '', hostModel: undefined, } // 获取配置项 this.getConfigOptions() this.configArr = [ { configTypeCode: undefined, configTypeName: '', cmd: '', excTime: '', rept: '000000000', weekList: [ { name: this.$t('周日'), value: 0 }, { name: this.$t('周一'), value: 0 }, { name: this.$t('周二'), value: 0 }, { name: this.$t('周三'), value: 0 }, { name: this.$t('周四'), value: 0 }, { name: this.$t('周五'), value: 0 }, { name: this.$t('周六'), value: 0 }, ], }, ] }, getConfigOptions() { this.configTypeOptions = [] for (let i = 0; i < 31; i++) { const configTypeCode = (1026 + i).toString() this.configTypeOptions.push({ configTypeCode, disabled: false, configTypeName: this.$t('空开配置') + i, }) } }, // 处理配置类型变更 handleConfigTypeChange(value, index) { const selectConfigCodes = new Set(this.configArr.map(item => item.configTypeCode)) this.configTypeOptions.forEach(option => { option.disabled = selectConfigCodes.has(option.configTypeCode) }) if (value) { const selectedOption = this.configTypeOptions.find(opt => opt.configTypeCode == value) if (selectedOption) { this.configArr[index].configTypeName = selectedOption.configTypeName } } }, toggleDay(day, item) { day.value = day.value == 0 ? 1 : 0 const values = item.weekList.map(d => d.value) item.rept = values.join('') + '00' }, // 添加配置项 addConfig() { this.configArr.push({ configTypeCode: undefined, configTypeName: '', cmd: '', excTime: '', rept: '000000000', weekList: [ { name: this.$t('周日'), value: 0 }, { name: this.$t('周一'), value: 0 }, { name: this.$t('周二'), value: 0 }, { name: this.$t('周三'), value: 0 }, { name: this.$t('周四'), value: 0 }, { name: this.$t('周五'), value: 0 }, { name: this.$t('周六'), value: 0 }, ], }) }, // 删除配置项 delConfig(index) { if (this.configArr.length == 1) { this.$message.warning(this.$t('至少保留一个配置项')) } else { this.configArr.splice(index, 1) this.handleConfigTypeChange() } }, // 取消 cancel() { this.visible = false }, // 确定 submit() { this.$refs.ruleForm.validate(valid => { console.log(this.$refs.transferRef) if (!valid) return const detectorList = this.$refs.transferRef.rightData || [] if (detectorList.length === 0) { this.$message.destroy() this.$message.warning(this.$t('请选择设备列表')) return } let errMsg = '' // 检查所有配置项 for (let i = 0; i < this.configArr.length; i++) { const item = this.configArr[i] // 检查配置类型是否已选择 if (!item.configTypeCode) { errMsg = this.$t('请选择空开配置类型') break } // 检查操作类型 if (item.cmd === '' || item.cmd === null || item.cmd === undefined) { errMsg = `${this.$t('请选择')}${item.configTypeName}${this.$t('分合闸')}` break } // 检查时间 if (!item.excTime) { errMsg = `${this.$t('请选择')}${item.configTypeName}${this.$t('时间')}` break } // 检查周期 if (!item.rept || item.rept === '000000000') { errMsg = `${this.$t('请选择')}${item.configTypeName}${this.$t('周期')}` break } } if (errMsg) { this.$message.destroy() this.$message.warning(errMsg) return } // 准备参数 const configs = this.configArr.map(item => ({ configTypeCode: item.configTypeCode, configTypeName: item.configTypeName, configValue: { cid: (item.configTypeCode - 1026).toString(), cmd: item.cmd, excTime: item.excTime, time: moment().valueOf(), rept: item.rept, uid: '', type: '0', }, })) const params = { commandMode: '0', // 配置模式 主机0 探测器1 issueType: '1', // 1为首次下发 2为重新下发 jobName: this.modalData.taskName, userCode: localStorage.getItem('userId'), detectorList: detectorList.map(item => ({ ...item, channelNo: `${item.systemAddress}@${item.partUnitLoopCode}@${item.channelNo}`, })), configs, } console.log(params) factory.batchConfig(params).then(res => { if (res.success) { this.$message.destroy() this.$message.success('操作成功') this.handleCancel() this.$parent.getTableList() } }) }) }, }, } </script> <style lang="less" scoped> .addTaskModal { width: 100%; height: 100%; text-align: left; box-sizing: border-box; } .main-body-box { .config_content { border-radius: 4px; border: 1px solid #ebedef; .config_title { height: 48px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid rgb(229, 231, 234); background: rgb(242, 243, 244); justify-content: space-between; } .config_main { height: 176px; padding: 16px; display: flex; flex-direction: column; justify-content: space-around; align-items: flex-start; color: rgb(105, 118, 136); font-family: '阿里巴巴普惠体'; font-size: 14px; font-weight: 400; background: rgb(255, 255, 255); .type_info { display: flex; align-items: center; } .week_info { display: flex; align-items: center; .week_list { display: flex; .week_item { height: 40px; width: 82px; display: flex; cursor: default; align-items: center; justify-content: center; position: relative; border: 1px solid rgb(217, 220, 224); border-radius: 4px; margin-right: 12px; color: rgb(105, 118, 136); font-family: '阿里巴巴普惠体'; font-size: 14px; font-weight: 400; &.selected { color: #006fff; border: 1px solid rgb(0, 111, 255); } .triangle { position: absolute; bottom: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 0 24px 24px; border-color: transparent transparent #006fff transparent; } /* 对勾实现 */ .checkmark { position: absolute; bottom: 5px; /* 调整位置使其在三角形内居中 */ right: 4px; /* 调整位置使其在三角形内居中 */ width: 8px; height: 5px; transform: rotate(-45deg); &::before { content: ''; position: absolute; width: 2px; height: 5px; background-color: white; left: 0; top: 0; } &::after { content: ''; position: absolute; width: 6px; height: 2px; background-color: white; right: 0; bottom: 0; } } } } } span { margin-right: 8px; } } } .addBtn { width: 100%; height: 32px; cursor: default; display: flex; align-items: center; justify-content: center; border-radius: 4px; margin-top: 12px; color: rgb(41, 141, 255); border: 1px dashed rgb(41, 141, 255); background: rgba(41, 141, 255, 0.1); } } </style>代码评审
08-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值