19ecb89b by renchao@pashanhoo.com

style:定时任务

1 parent 7a045f2d
{
"TITLE": "汉中市数据上报系统",
"THEME": "jg",
"LOGIN": "jg",
"CODE": "BDCJGPT",
"THEME": "sb",
"LOGIN": "sb",
"CODE": "BDCSBPT",
"AREARMAP": "610702",
"SERVERAPI": "/bdcsjsb",
"calcHeight": 160,
......
......@@ -73,15 +73,17 @@
<el-row>
<el-col :span="8">
<el-form-item prop="FDZL">
<el-form-item prop="QSZT">
<span slot="label">
房地坐落<br />
<p class="label-detail">FDZL</p>
权属状态<br />
<p class="label-detail">QSZT</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.fdzl"></el-input>
<el-select :disabled="$store.state.business.Edit" v-model="ruleForm.qszt">
<el-option v-for="item in dicData['A22']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="TDSYQR">
<span slot="label">
......@@ -333,19 +335,19 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="QSZT">
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="FDZL">
<span slot="label">
权属状态<br />
<p class="label-detail">QSZT</p>
房地坐落<br />
<p class="label-detail">FDZL</p>
</span>
<el-select :disabled="$store.state.business.Edit" v-model="ruleForm.qszt">
<el-option v-for="item in dicData['A22']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.fdzl"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<message-tips ref="msg" />
......
......@@ -723,6 +723,10 @@
background: #ffffff;
border: 1px solid #294ef1;
padding: 15px;
.el-form-item__content {
display: flex;
}
}
// 修改密码界面样式
......
......@@ -2,7 +2,7 @@
<!-- 编辑 -->
<dialogBox ref="addTask" width="50%" :isMain="true" @submitForm="handleSubmit" @closeDialog="handleClose"
v-model="myValue" customClass="editValidRule" title="新增定时任务">
<div class="dialogCon" style="height:360px">
<div class="dialogCon" style="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
......@@ -31,7 +31,7 @@
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="任务描述" prop="remark">
<el-input v-model="ruleForm.remark" placeholder="任务描述"></el-input>
<el-input v-model="ruleForm.remark" type="textarea" :rows="2" placeholder="任务描述"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -42,136 +42,110 @@
</template>
<script>
import sjsbTask from '@/api/sjsbTask.js'
export default {
props: {
value: { type: Boolean, default: false },
taskData: {
type: Object,
default: null
}
import sjsbTask from '@/api/sjsbTask.js'
export default {
props: {
value: { type: Boolean, default: false },
taskData: {
type: Object,
default: null
}
},
data () {
return {
myValue: this.value,
ruleForm: {
jobName: '',
cronExpression: '',
beanName: '',
methodName: '',
methodParams: '',
remark: ''
},
rules: {
jobName: [
{ required: true, message: '任务名', trigger: 'blur' }
],
cronExpression: [
{ required: true, message: 'cron表达式', trigger: 'blur' }
],
beanName: [
{ required: true, message: '任务类名', trigger: 'blur' }
],
methodName: [
{ required: true, message: '任务方法名', trigger: 'blur' }
]
},
message: ''
}
},
methods: {
handleSubmit () {
let _this = this
this.$refs['ruleForm'].validate(async (valid) => {
if (valid) {
if (!_this.taskData) {
try {
let res = await sjsbTask.sjsbTaskSave(_this.ruleForm)
if (res.code == 200) {
_this.loading = false
_this.$message({
message: res.message,
type: 'success'
})
_this.handleClose()
_this.$parent.featchData()
}
} catch (error) {
_this.message = error
_this.$refs.msg.messageShow()
}
} else {
try {
let res = await sjsbTask.updateCron(_this.ruleForm)
if (res.code == 200) {
_this.$message({
message: res.message,
type: 'success'
})
_this.handleClose()
_this.$parent.featchData()
}
} catch (error) {
_this.message = error
_this.$refs.msg.messageShow()
}
}
} else {
this.$message('请检查表单完整性')
return false;
}
})
},
handleClose () {
this.$emit("input", false);
}
},
watch: {
value (val) {
this.myValue = val
},
data () {
return {
myValue: this.value,
ruleForm: {
taskData (val) {
if (val != null) {
this.ruleForm = val
} else {
this.ruleForm = {
jobName: '',
cronExpression: '',
beanName: '',
methodName: '',
methodParams: '',
remark: ''
},
rules: {
jobName: [
{ required: true, message: '任务名', trigger: 'blur' }
],
cronExpression: [
{ required: true, message: 'cron表达式', trigger: 'blur' }
],
beanName: [
{ required: true, message: '任务类名', trigger: 'blur' }
],
methodName: [
{ required: true, message: '任务方法名', trigger: 'blur' }
]
},
message: ''
}
},
methods: {
handleSubmit () {
let _this = this
this.$refs['ruleForm'].validate(async (valid) => {
if (valid) {
if (!_this.taskData) {
try {
let res = await sjsbTask.sjsbTaskSave(_this.ruleForm)
if (res.code == 200) {
_this.loading = false
_this.$message({
message: res.message,
type: 'success'
})
_this.handleClose()
_this.$parent.featchData()
}
} catch (error) {
_this.message = error
_this.$refs.msg.messageShow()
}
} else {
try {
let res = await sjsbTask.updateCron(_this.ruleForm)
if (res.code == 200) {
_this.$message({
message: res.message,
type: 'success'
})
_this.handleClose()
_this.$parent.featchData()
}
} catch (error) {
_this.message = error
_this.$refs.msg.messageShow()
}
}
} else {
this.$message('请检查表单完整性')
return false;
}
})
},
handleClose () {
this.$emit("input", false);
}
},
watch: {
value (val) {
this.myValue = val
},
taskData (val) {
if (val != null) {
this.ruleForm = val
} else {
this.ruleForm = {
jobName: '',
cronExpression: '',
beanName: '',
methodName: '',
methodParams: '',
remark: ''
}
}
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
// /deep/.dialogBox .dialog_title {
// margin-left: 5px !important;
// }
// /deep/.el-dialog__headerbtn {
// margin-top: -12px;
// }
// .editDialogBox-box {
// margin: 14px 18px 30px 18px !important
// }
// /deep/.el-form-item__label {
// color: #fff;
// }
// /deep/.el-form-item {
// color: #fff;
// margin-bottom: 10px;
// }
// /deep/ .el-input__inner {
// background-color: transparent;
// border: 1px solid #458ACF;
// }
</style>
......